im slightly retarded

This commit is contained in:
Drake Panzer 2020-12-12 11:57:56 -07:00
parent b381386f8d
commit 78f3222514
1 changed files with 6 additions and 6 deletions

View File

@ -149,12 +149,6 @@ class SpecialContact extends UnlistedSpecialPage
$fromAddress = $user->getEmail();
}
// verify the user actually entered an email address
// the frontend form should verify the email but this is just a backup for spammers
if (!filter_var($fromAddress, FILTER_VALIDATE_EMAIL)) {
die("$fromAddress is not a valid email address.");
}
$additional = $config['AdditionalFields'];
$formItems = [
@ -295,6 +289,12 @@ class SpecialContact extends UnlistedSpecialPage
$fromAddress = $formData['FromAddress'];
$fromName = $formData['FromName'];
// verify the user actually entered an email address
// the frontend form should verify the email but this is just a backup for spammers
if (!filter_var($fromAddress, FILTER_VALIDATE_EMAIL)) {
die("$fromAddress is not a valid email address.");
}
$contactSender = new MailAddress(
$this->getConfig()->get('PasswordSender'),
$config['SenderName']