| @@ 88-95 (lines=8) @@ | ||
| 85 | if ($folderName == '.') { |
|
| 86 | $folderName = ''; |
|
| 87 | } |
|
| 88 | if ($folderName) { |
|
| 89 | $folderName .= '/'; |
|
| 90 | // Not allowed to use “../” |
|
| 91 | if (strpos('/' . $folderName, '/../') !== false) { |
|
| 92 | FlashMessages::addMessage('Folder names are not allowed to include “../”'); |
|
| 93 | break; |
|
| 94 | } |
|
| 95 | } |
|
| 96 | ||
| 97 | // Make sure the media folder exists |
|
| 98 | if (!is_dir(WT_DATA_DIR . $MEDIA_DIRECTORY)) { |
|
| @@ 245-252 (lines=8) @@ | ||
| 242 | if ($folderName == '.') { |
|
| 243 | $folderName = ''; |
|
| 244 | } |
|
| 245 | if ($folderName) { |
|
| 246 | $folderName .= '/'; |
|
| 247 | // Not allowed to use “../” |
|
| 248 | if (strpos('/' . $folderName, '/../') !== false) { |
|
| 249 | FlashMessages::addMessage('Folder names are not allowed to include “../”'); |
|
| 250 | break; |
|
| 251 | } |
|
| 252 | } |
|
| 253 | ||
| 254 | // Make sure the media folder exists |
|
| 255 | if (!is_dir(WT_DATA_DIR . $MEDIA_DIRECTORY)) { |
|
| @@ 52-59 (lines=8) @@ | ||
| 49 | if ($folderName == '.') { |
|
| 50 | $folderName = ''; |
|
| 51 | } |
|
| 52 | if ($folderName) { |
|
| 53 | $folderName .= '/'; |
|
| 54 | // Not allowed to use “../” |
|
| 55 | if (strpos('/' . $folderName, '/../') !== false) { |
|
| 56 | FlashMessages::addMessage('Folder names are not allowed to include “../”'); |
|
| 57 | break; |
|
| 58 | } |
|
| 59 | } |
|
| 60 | ||
| 61 | // Make sure the media folder exists |
|
| 62 | if (!is_dir(WT_DATA_DIR . $MEDIA_DIRECTORY)) { |
|