|
7 | 7 | * For the full copyright and license information, please view the LICENSE.txt
|
8 | 8 | * file that was distributed with this source code.
|
9 | 9 | */
|
10 |
| - |
| 10 | + |
11 | 11 | /**
|
12 | 12 | * This file is used to install the Mouf framework by creating the .htaccess file.
|
13 | 13 | */
|
|
43 | 43 |
|
44 | 44 | require_once 'MoufComponents.php';
|
45 | 45 | ?>";
|
46 |
| - |
| 46 | + |
47 | 47 | file_put_contents("../../../../mouf/Mouf.php", $moufStr);
|
48 | 48 | chmod("../../../../mouf/Mouf.php", 0664);
|
49 | 49 | }
|
|
62 | 62 | \$moufManager = MoufManager::getMoufManager();
|
63 | 63 |
|
64 | 64 | ?>";
|
65 |
| - |
| 65 | + |
66 | 66 | file_put_contents("../../../../mouf/MoufComponents.php", $moufComponentsStr);
|
67 | 67 | chmod("../../../../mouf/MoufComponents.php", 0664);
|
68 | 68 | }
|
|
75 | 75 | */
|
76 | 76 |
|
77 | 77 | ?>";
|
78 |
| - |
| 78 | + |
79 | 79 | file_put_contents("../../../../mouf/MoufUI.php", $moufUIStr);
|
80 | 80 | chmod("../../../../mouf/MoufUI.php", 0664);
|
81 | 81 | }
|
|
89 | 89 | */
|
90 | 90 |
|
91 | 91 | ?>";
|
92 |
| - |
| 92 | + |
93 | 93 | file_put_contents("../../../../config.php", $moufConfig);
|
94 | 94 | chmod("../../../../config.php", 0664);
|
95 | 95 | }
|
|
100 | 100 | /**
|
101 | 101 | * This contains the users allowed to access the Mouf framework.
|
102 | 102 | */
|
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); |
104 | 104 |
|
105 | 105 | ?>";
|
106 |
| - |
| 106 | + |
107 | 107 | file_put_contents("../../../../mouf/no_commit/MoufUsers.php", $moufConfig);
|
108 | 108 | chmod("../../../../mouf/no_commit/MoufUsers.php", 0664);
|
109 | 109 | }
|
110 | 110 |
|
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 |
| - |
123 | 111 | umask($oldUmask);
|
124 | 112 |
|
125 | 113 | header("Location: ".$uri."/");
|
|
0 commit comments