Always set the "To:" header when sending mail

Use "undisclosed-recipients: ;" when sending mass notifications (such as
comment notifications and the like. Addresses FS#28229.

Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
Lukas Fleischer 2012-03-08 11:43:48 +01:00
parent a774b3d355
commit f5e1652bf9
3 changed files with 4 additions and 4 deletions

View file

@ -70,8 +70,8 @@ if (isset($_GET['resetkey'], $_POST['email'], $_POST['password'], $_POST['confir
"{$AUR_LOCATION}/passreset.php?". "{$AUR_LOCATION}/passreset.php?".
"resetkey={$resetkey}"; "resetkey={$resetkey}";
$body = wordwrap($body, 70); $body = wordwrap($body, 70);
$headers = "To: {$email}\nReply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR"; $headers = "Reply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR";
@mail(' ', 'AUR Password Reset', $body, $headers); @mail($email, 'AUR Password Reset', $body, $headers);
} }
header('Location: passreset.php?step=confirm'); header('Location: passreset.php?step=confirm');

View file

@ -745,7 +745,7 @@ function pkg_delete ($atype, $ids, $mergepkgid, $dbh=NULL) {
$body = wordwrap($body, 70); $body = wordwrap($body, 70);
$bcc = implode(', ', $bcc); $bcc = implode(', ', $bcc);
$headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom: aur-notify@archlinux.org\nX-Mailer: AUR\n"; $headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom: aur-notify@archlinux.org\nX-Mailer: AUR\n";
@mail(' ', "AUR Package deleted: " . $pkgname, $body, $headers); @mail('undisclosed-recipients: ;', "AUR Package deleted: " . $pkgname, $body, $headers);
} }
} }

View file

@ -43,7 +43,7 @@ if (isset($_REQUEST['comment'])) {
$body = wordwrap($body, 70); $body = wordwrap($body, 70);
$bcc = implode(', ', $bcc); $bcc = implode(', ', $bcc);
$headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom: aur-notify@archlinux.org\nX-Mailer: AUR\n"; $headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom: aur-notify@archlinux.org\nX-Mailer: AUR\n";
@mail(' ', "AUR Comment for " . $row['Name'], $body, $headers); @mail('undisclosed-recipients: ;', "AUR Comment for " . $row['Name'], $body, $headers);
} }
} }