|
25 | 25 | ]);
|
26 | 26 |
|
27 | 27 | // Security keys salt - NEVER SHARE THIS
|
28 |
| -// Format: define('SALT', 'randomstring'); |
29 | 28 | // Used to generate and compute security keys
|
30 | 29 | // Changing this will render all previously generated
|
31 | 30 | // deletion URLs invalid without any exception
|
32 |
| -// Keep empty to disable this feature, only admins will |
33 |
| -// then be able to delete files without security keys |
| 31 | +// Keep as-is, set empty, or remove the define |
| 32 | +// to disable this feature, only admins will then |
| 33 | +// be able to delete files without security keys |
34 | 34 | // Mandatory for having deletion URLs, set this to
|
35 | 35 | // a very long and random string of various characters
|
36 | 36 | // Random generator: https://bfnt.io/pwgen
|
37 |
| -define('SALT', ''); |
| 37 | +define('SALT', 'change-me'); |
38 | 38 |
|
39 | 39 | // List of allowed image extensions
|
40 | 40 | // Only put image extensions here unless
|
41 | 41 | // you edit the MIME_TYPE_REGEX option as well,
|
42 | 42 | // which is very discouraged for security reasons
|
43 |
| -define('EXTS', ['png', 'jpg', 'jpeg', 'gif', 'webm', 'mp4']); |
| 43 | +// Regular expressions can be used as well here |
| 44 | +define('EXTS', ['png', 'jpe?g', 'gif', 'webm', 'mp4']); |
44 | 45 |
|
45 | 46 |
|
46 | 47 | /* OPTIONAL CONSTANTS BELOW THIS LINE */
|
|
119 | 120 | \*****************************/
|
120 | 121 |
|
121 | 122 |
|
122 |
| -define('VERSION', '2.1.0'); |
| 123 | +define('VERSION', '2.1.1'); |
123 | 124 | define('SOURCE', 'https://github.com/Xenthys/ShareXen');
|
124 | 125 |
|
125 | 126 | $data = [
|
@@ -346,7 +347,7 @@ function error_die(&$data, $code, $reason = 'unknown_error', $debug = '')
|
346 | 347 |
|
347 | 348 | function retrieve_key($name)
|
348 | 349 | {
|
349 |
| - if (!defined('SALT')) |
| 350 | + if (!defined('SALT') || !SALT || SALT === "change-me") |
350 | 351 | {
|
351 | 352 | return false;
|
352 | 353 | }
|
|
0 commit comments