projects
/
gatekeeper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
03331c3
)
Discard names of trash files immediately after unlink
author
Jacob Bachmeyer
<jcb@gnu.org>
Sat, 15 Oct 2022 03:43:44 +0000
(22:43 -0500)
committer
Jacob Bachmeyer
<jcb@gnu.org>
Sat, 15 Oct 2022 03:43:44 +0000
(22:43 -0500)
gatekeeper.pl
patch
|
blob
|
blame
|
history
diff --git
a/gatekeeper.pl
b/gatekeeper.pl
index 4fe6fb74dc6faa18c8d08f1fec8558f16e212045..ed9fd7e5d1a1ea83a042ee5e3acbe7c02b48f777 100755
(executable)
--- a/
gatekeeper.pl
+++ b/
gatekeeper.pl
@@
-918,6
+918,8
@@
sub scan_incoming {
# dispose of any garbage files
ftp_syslog('info', "Trashcanned files removed")
if unlink @trash;
+ @trash = (); # and empty the array to be safe, since it contained
+ # potentially arbitrary _untainted_ filenames
# No possible files found, so return before we call lsof
return () unless %possible;