3 ms·
In the past I used a perl cgi script and then simple regex filters to discard anything that is not alpha-numeric prior to validating input and then discarding a
by LinuxBender 3y ago
In the past I used a perl cgi script and then simple regex filters to discard anything that is not alpha-numeric prior to validating input and then discarding anything that had spamish keywords or excessive spacing or lines. UTF is not alpha-numeric. Not perfect but rarely abused. Nowadays I would probably add a one-line form that asks for a free-form answer to a random question from a million question factoid database. An LLM could look up the answer but if enough people did this it would get expensive and if that became a pattern I would just give them offensive questions. Offensive to an LLM in that it would break their terms of use as spammers mostly abuse other peoples resources and rarely self-host anything.