File: 1003_php8-compat.patch

package info (click to toggle)
slbackup-php 0.4.5-4%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 548 kB
  • sloc: php: 983; makefile: 92; sh: 48
file content (16 lines) | stat: -rw-r--r-- 507 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
From: Guido Berhoerster <guido@berhoerster.name>
Subject: Add compatibility with PHP 8

crypt() reuires a salt in PHP 8.

--- slbackup-php.orig/src/index.php
+++ slbackup-php/src/index.php
@@ -695,7 +695,7 @@ if (empty ($config)) {
 }
 
 if (empty($encrypt) || empty ($xorstring)) {
-    $encrypt = crypt(strrev(sprintf (gettimeofday (true)))) ;
+    $encrypt = crypt('', strrev(sprintf (gettimeofday (true)))) ;
     $_SESSION['encrypt'] = $encrypt ; 
     $xorstring = xorstring ($encrypt, $passwd) ; 
 }