projects
/
gatekeeper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3210bff
)
Ensure that upload handler syslog messages do not span lines
author
Jacob Bachmeyer
<jcb@gnu.org>
Fri, 10 Dec 2021 22:54:51 +0000
(16:54 -0600)
committer
Jacob Bachmeyer
<jcb@gnu.org>
Fri, 10 Dec 2021 22:54:51 +0000
(16:54 -0600)
upload-ftp-v1.2.pl
patch
|
blob
|
blame
|
history
diff --git
a/upload-ftp-v1.2.pl
b/upload-ftp-v1.2.pl
index b59b71f0e44ed1fb22286b26677f9edb2780d554..b423ce1316733105f7e9a340966be949fe0df02e 100755
(executable)
--- a/
upload-ftp-v1.2.pl
+++ b/
upload-ftp-v1.2.pl
@@
-1452,6
+1452,12
@@
sub ftp_die($$) {
sub ftp_syslog {
my ($priority,$message) = @_;
+
+ # Remove a trailing newline
+ $message =~ s/[\r\n]+$//;
+ # Collapse the message to a single line for syslog
+ $message =~ s/[\r\n]+/ \/ /g;
+
# The syslog function is pretty picky, and (sometimes) dies silently
# when using non-valid syslog priorities.
# That's why we run it inside an eval, and print out any errors to STDERR.