mirror of
https://github.com/php/web-php.git
synced 2026-03-23 23:02:13 +01:00
let the flames begin :) Only allow the submission of 3 notes per
minute, to protect aganist a DoS attack
This commit is contained in:
@@ -80,9 +80,13 @@ if (isset($note) && isset($user) &&
|
||||
|
||||
// If there is any non-header result, then it is an error
|
||||
if ($result) {
|
||||
echo "<!-- $result -->";
|
||||
echo "<p class=\"error\">There was an error processing your submission. It has been automatically e-mailed to the developers, who will process the note manually.</p>";
|
||||
}
|
||||
if (strpos ($result, '[TOO MANY NOTES]') !== false) {
|
||||
print "<p class=\"error\">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.</p>";
|
||||
} else {
|
||||
echo "<!-- $result -->";
|
||||
echo "<p class=\"error\">There was an error processing your submission. It has been automatically e-mailed to the developers, who will process the note manually.</p>";
|
||||
}
|
||||
}
|
||||
|
||||
// There was no error returned
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user