Skip to content

Commit 4d694d0

Browse files
committed
✨ Road to PHP 8, remove inexistant get_magic_quotes_gpc call
1 parent adbf820 commit 4d694d0

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

composer.phar

815 KB
Binary file not shown.

src/install.php

+7-19
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* For the full copyright and license information, please view the LICENSE.txt
88
* file that was distributed with this source code.
99
*/
10-
10+
1111
/**
1212
* This file is used to install the Mouf framework by creating the .htaccess file.
1313
*/
@@ -43,7 +43,7 @@
4343
4444
require_once 'MoufComponents.php';
4545
?>";
46-
46+
4747
file_put_contents("../../../../mouf/Mouf.php", $moufStr);
4848
chmod("../../../../mouf/Mouf.php", 0664);
4949
}
@@ -62,7 +62,7 @@
6262
\$moufManager = MoufManager::getMoufManager();
6363
6464
?>";
65-
65+
6666
file_put_contents("../../../../mouf/MoufComponents.php", $moufComponentsStr);
6767
chmod("../../../../mouf/MoufComponents.php", 0664);
6868
}
@@ -75,7 +75,7 @@
7575
*/
7676
7777
?>";
78-
78+
7979
file_put_contents("../../../../mouf/MoufUI.php", $moufUIStr);
8080
chmod("../../../../mouf/MoufUI.php", 0664);
8181
}
@@ -89,7 +89,7 @@
8989
*/
9090
9191
?>";
92-
92+
9393
file_put_contents("../../../../config.php", $moufConfig);
9494
chmod("../../../../config.php", 0664);
9595
}
@@ -100,26 +100,14 @@
100100
/**
101101
* This contains the users allowed to access the Mouf framework.
102102
*/
103-
\$users[".var_export(install_userinput_to_plainstring($_REQUEST['login']), true)."] = array('password'=>".var_export(sha1(install_userinput_to_plainstring($_REQUEST['password'])), true).", 'options'=>null);
103+
\$users[".var_export($_REQUEST['login'], true)."] = array('password'=>".var_export(sha1(install_userinput_to_plainstring($_REQUEST['password'])), true).", 'options'=>null);
104104
105105
?>";
106-
106+
107107
file_put_contents("../../../../mouf/no_commit/MoufUsers.php", $moufConfig);
108108
chmod("../../../../mouf/no_commit/MoufUsers.php", 0664);
109109
}
110110

111-
function install_userinput_to_plainstring($str) {
112-
if (version_compare(phpversion(), '7.4.0', '<') && get_magic_quotes_gpc()==1)
113-
{
114-
$str = stripslashes($str);
115-
// Rajouter les slashes soumis par l'utilisateur
116-
//$str = str_replace('\\', '\\\\', $str);
117-
return $str;
118-
}
119-
else
120-
return $str;
121-
}
122-
123111
umask($oldUmask);
124112

125113
header("Location: ".$uri."/");

0 commit comments

Comments
 (0)