| @@ 81-88 (lines=8) @@ | ||
| 78 | if ($folderName == '.') { |
|
| 79 | $folderName = ''; |
|
| 80 | } |
|
| 81 | if ($folderName) { |
|
| 82 | $folderName .= '/'; |
|
| 83 | // Not allowed to use “../” |
|
| 84 | if (strpos('/' . $folderName, '/../') !== false) { |
|
| 85 | FlashMessages::addMessage('Folder names are not allowed to include “../”'); |
|
| 86 | break; |
|
| 87 | } |
|
| 88 | } |
|
| 89 | ||
| 90 | // Make sure the media folder exists |
|
| 91 | if (!is_dir(WT_DATA_DIR . $MEDIA_DIRECTORY)) { |
|
| @@ 237-244 (lines=8) @@ | ||
| 234 | if ($folderName == '.') { |
|
| 235 | $folderName = ''; |
|
| 236 | } |
|
| 237 | if ($folderName) { |
|
| 238 | $folderName .= '/'; |
|
| 239 | // Not allowed to use “../” |
|
| 240 | if (strpos('/' . $folderName, '/../') !== false) { |
|
| 241 | FlashMessages::addMessage('Folder names are not allowed to include “../”'); |
|
| 242 | break; |
|
| 243 | } |
|
| 244 | } |
|
| 245 | ||
| 246 | // Make sure the media folder exists |
|
| 247 | if (!is_dir(WT_DATA_DIR . $MEDIA_DIRECTORY)) { |
|
| @@ 47-54 (lines=8) @@ | ||
| 44 | if ($folderName == '.') { |
|
| 45 | $folderName = ''; |
|
| 46 | } |
|
| 47 | if ($folderName) { |
|
| 48 | $folderName .= '/'; |
|
| 49 | // Not allowed to use “../” |
|
| 50 | if (strpos('/' . $folderName, '/../') !== false) { |
|
| 51 | FlashMessages::addMessage('Folder names are not allowed to include “../”'); |
|
| 52 | break; |
|
| 53 | } |
|
| 54 | } |
|
| 55 | ||
| 56 | // Make sure the media folder exists |
|
| 57 | if (!is_dir(WT_DATA_DIR . $MEDIA_DIRECTORY)) { |
|