]> git.p6c8.net - jirafeau/pcanterino.git/commitdiff
Fixed file encryption in classic uploads
authorPatrick Canterino <patrick@patrick-canterino.de>
Sun, 31 May 2026 13:29:37 +0000 (15:29 +0200)
committerPatrick Canterino <patrick@patrick-canterino.de>
Sun, 31 May 2026 13:29:37 +0000 (15:29 +0200)
Encrypted files uploaded using classic (synchronous) uploads were marked using "C" identifying legacy mcrypt encryption
=> changed to "C2" identifying Sodium encryption

lib/functions.php

index 84bcea8ebaff44c805ac6a33d4b03c8abcd39c32..0d660667bdb660f0a46904d7198e58a7667d6401 100644 (file)
@@ -554,7 +554,7 @@ function jirafeau_add_file($file, $one_time_download, $key, $time, $ip, $crypt,
         $handle,
         $name . NL. $mime_type . NL. $size . NL. $password . NL. $time .
             NL . $hash. NL . ($one_time_download ? 'O' : 'R') . NL . time() .
         $handle,
         $name . NL. $mime_type . NL. $size . NL. $password . NL. $time .
             NL . $hash. NL . ($one_time_download ? 'O' : 'R') . NL . time() .
-            NL . $ip . NL. $delete_link_code . NL . ($crypted ? 'C' : 'O')
+            NL . $ip . NL. $delete_link_code . NL . ($crypted ? 'C2' : 'O')
     );
     fclose($handle);
     $hash_link = substr(base_16_to_64(md5_file($link_tmp_name)), 0, $link_name_length);
     );
     fclose($handle);
     $hash_link = substr(base_16_to_64(md5_file($link_tmp_name)), 0, $link_name_length);

patrick-canterino.de