From 5afcc4dd478e5f0858ea23aefeec3c025218e98d Mon Sep 17 00:00:00 2001 From: Andrew Lindeman Date: Sun, 18 May 2003 16:19:22 +0000 Subject: [PATCH] let the flames begin :) Only allow the submission of 3 notes per minute, to protect aganist a DoS attack --- manual/add-note.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/manual/add-note.php b/manual/add-note.php index ebed1cb2e..fae45882a 100644 --- a/manual/add-note.php +++ b/manual/add-note.php @@ -80,9 +80,13 @@ if (isset($note) && isset($user) && // If there is any non-header result, then it is an error if ($result) { - echo ""; - echo "

There was an error processing your submission. It has been automatically e-mailed to the developers, who will process the note manually.

"; - } + if (strpos ($result, '[TOO MANY NOTES]') !== false) { + print "

As a security precaution, we only allow a certain number of notes to be submitted per minute. At this time, this number has been exceeded. Please re-submit your note in about a minute.

"; + } else { + echo ""; + echo "

There was an error processing your submission. It has been automatically e-mailed to the developers, who will process the note manually.

"; + } + } // There was no error returned else {