Skip to content

Commit

Permalink
resend_password_processing.php: do not throw on no email (#1974)
Browse files Browse the repository at this point in the history
When the `email` request field doesn't exist, an error is thrown and it
sends a bug report email. Even though the actual page has an HTML5 form
property that prevents submitting an empty email, it appears that
crawlers are submitting this page without the `email` field.

We can prevent this bug report email if we default `email` to an empty
string, so that the user gets an error message response. This is not
ideal, because it means that if the form breaks (e.g. field is changed
without updating the processor), we won't get bug emails, but I think
this is necessary to avoid the sheer volume of crawler bug emails.
  • Loading branch information
hemberger authored Dec 6, 2024
1 parent bd7d8d0 commit c4833f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/htdocs/resend_password_processing.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
try {
require_once('../bootstrap.php');

$email = Request::get('email');
$email = Request::get('email', ''); // default prevents crawler bug report spam
if ($email === '') {
create_error('You must specify an e-mail address!');
}
Expand Down

0 comments on commit c4833f9

Please sign in to comment.