[PATCH 4/4] Remove tempfile when hash verification fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 scripts/upload.cgi/upload.cgi | 1 +
 1 file changed, 1 insertion(+)

diff --git a/scripts/upload.cgi/upload.cgi b/scripts/upload.cgi/upload.cgi
index e32573d..999155e 100644
--- a/scripts/upload.cgi/upload.cgi
+++ b/scripts/upload.cgi/upload.cgi
@@ -192,6 +192,7 @@ def main():
     tmpfd.close()
     check_checksum = m.hexdigest()
     if checksum != check_checksum:
+        os.unlink(tmpfile)
         send_error("Checksum check failed. Received %s instead of %s." % (check_checksum, checksum))
 
     # wow, even the check matches. make sure full path is valid now
-- 
1.8.5.3

_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure





[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux