summaryrefslogtreecommitdiffstats
path: root/web/lib/pkgfuncs.inc.php
diff options
context:
space:
mode:
authorLukas Fleischer <archlinux@cryptocrack.de>2014-02-10 20:40:52 +0100
committerLukas Fleischer <archlinux@cryptocrack.de>2014-02-10 20:48:34 +0100
commit16c3a86193013efd604e4fe4c7ab225c3f65be87 (patch)
treed0df6c47cfab744f8149533a34875983caca6f4f /web/lib/pkgfuncs.inc.php
parent9864988517a0c687a0ebe9fccecc126cec1b2776 (diff)
downloadaur-16c3a86193013efd604e4fe4c7ab225c3f65be87.tar.gz
aur-16c3a86193013efd604e4fe4c7ab225c3f65be87.tar.xz
Use CRLF to separate headers in mail()
This is the correct delimiter for mail headers according to the PHP documentation and RFC 2822. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
Diffstat (limited to 'web/lib/pkgfuncs.inc.php')
-rw-r--r--web/lib/pkgfuncs.inc.php15
1 files changed, 12 insertions, 3 deletions
diff --git a/web/lib/pkgfuncs.inc.php b/web/lib/pkgfuncs.inc.php
index 5800a265..e90d5634 100644
--- a/web/lib/pkgfuncs.inc.php
+++ b/web/lib/pkgfuncs.inc.php
@@ -295,7 +295,10 @@ function add_package_comment($pkgid, $uid, $comment) {
. "\n\n---\nIf you no longer wish to receive notifications about this package, please go the the above package page and click the UnNotify button.";
$body = wordwrap($body, 70);
$bcc = implode(', ', $bcc);
- $headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom: aur-notify@archlinux.org\nX-Mailer: AUR\n";
+ $headers = "Bcc: $bcc\r\n" .
+ "Reply-to: nobody@archlinux.org\r\n" .
+ "From: aur-notify@archlinux.org\r\n" .
+ "X-Mailer: AUR";
@mail('undisclosed-recipients: ;', "AUR Comment for " . $row['Name'], $body, $headers);
}
}
@@ -797,7 +800,10 @@ function pkg_flag($atype, $ids) {
while ($row = $result->fetch(PDO::FETCH_ASSOC)) {
$body = "Your package " . $row['Name'] . " has been flagged out of date by " . $f_name . " [1]. You may view your package at:\n" . $AUR_LOCATION . get_pkg_uri($row['Name']) . "\n\n[1] - " . $AUR_LOCATION . get_user_uri($f_name);
$body = wordwrap($body, 70);
- $headers = "Reply-to: nobody@archlinux.org\nFrom:aur-notify@archlinux.org\nX-Mailer: PHP\nX-MimeOLE: Produced By AUR\n";
+ $headers = "Reply-to: nobody@archlinux.org\r\n" .
+ "From: aur-notify@archlinux.org\r\n" .
+ "X-Mailer: PHP\r\n" .
+ "X-MimeOLE: Produced By AUR";
@mail($row['Email'], "AUR Out-of-date Notification for ".$row['Name'], $body, $headers);
}
}
@@ -903,7 +909,10 @@ function pkg_delete ($atype, $ids, $mergepkgid) {
}
$body = wordwrap($body, 70);
$bcc = implode(', ', $bcc);
- $headers = "Bcc: $bcc\nReply-to: nobody@archlinux.org\nFrom: aur-notify@archlinux.org\nX-Mailer: AUR\n";
+ $headers = "Bcc: $bcc\r\n" .
+ "Reply-to: nobody@archlinux.org\r\n" .
+ "From: aur-notify@archlinux.org\r\n" .
+ "X-Mailer: AUR";
@mail('undisclosed-recipients: ;', "AUR Package deleted: " . $pkgname, $body, $headers);
}
}