| @@ 142-144 (lines=3) @@ | ||
| 139 | } |
|
| 140 | // Use the name of the uploaded file? |
|
| 141 | // If no filename specified, use the name of the uploaded file? |
|
| 142 | if (!$filename && !empty($_FILES['mediafile']['name'])) { |
|
| 143 | $filename = $_FILES['mediafile']['name']; |
|
| 144 | } |
|
| 145 | ||
| 146 | // Validate the media path and filename |
|
| 147 | if (preg_match('/^https?:\/\//i', $text[0], $match)) { |
|
| @@ 105-107 (lines=3) @@ | ||
| 102 | // User-specified filename? |
|
| 103 | $filename = Filter::post('filename' . $i); |
|
| 104 | // Use the name of the uploaded file? |
|
| 105 | if (!$filename && !empty($_FILES['mediafile' . $i]['name'])) { |
|
| 106 | $filename = $_FILES['mediafile' . $i]['name']; |
|
| 107 | } |
|
| 108 | ||
| 109 | // Validate the media path and filename |
|
| 110 | if (preg_match('/([\/\\\\<>])/', $filename, $match)) { |
|