X-Git-Url: https://git.p6c8.net/jirafeau_project.git/blobdiff_plain/be4715096f9a63d823da90c405f500d454247989..1f2b94fb15bbb1a4d4da0a2890aec3125abb32c3:/lib/functions.php?ds=inline
diff --git a/lib/functions.php b/lib/functions.php
index c42293b..b87f6c3 100644
--- a/lib/functions.php
+++ b/lib/functions.php
@@ -460,8 +460,9 @@ function jirafeau_upload($file, $one_time_download, $key, $time, $ip, $crypt, $l
if ($crypt == true && extension_loaded('sodium') == true) {
$crypt_key = jirafeau_encrypt_file($file['tmp_name'], $file['tmp_name'].'crypt');
if (strlen($crypt_key) > 0) {
- $crypted = true;
- rename($file['tmp_name'].'crypt', $file['tmp_name']);
+ if (rename($file['tmp_name'].'crypt', $file['tmp_name']) === true) {
+ $crypted = true;
+ }
}
}
@@ -878,7 +879,7 @@ function jirafeau_fileperms($path)
function jirafeau_admin_bug_report($cfg)
{
$out = "