git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db5d20d
)
widget/contact: send from given name
author
Mischa POSLAWSKY
<perl@shiar.org>
Mon, 25 Jan 2021 23:05:30 +0000
(
00:05
+0100)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 26 Jan 2021 00:22:41 +0000
(
01:22
+0100)
Apply naam input to sender email address.
widget/contact.php
patch
|
blob
|
history
diff --git
a/widget/contact.php
b/widget/contact.php
index a4fccda1a0ca8aead4f0b5f106653696cf05e043..c6e702234b8d8d00e46258d6c5952a75f0108ac2 100644
(file)
--- a/
widget/contact.php
+++ b/
widget/contact.php
@@
-52,6
+52,9
@@
switch ($source) {
$reply = preg_match('/\A[^\s\'@]{1,64}@[.a-zA-Z0-9-]{4,63}\z/', @$input['email'])
? $input['email'] : "noreply@$domain";
+ if ($displayname = @$input['naam']) {
+ $reply = sprintf('"%s" <%s>', addcslashes($displayname, "\\\"\0..\37"), $reply);
+ }
$header = "From: $reply";
foreach (array(