Skip to content

Commit

Permalink
Add check for hyphen in filename (joomla#23712)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReLater authored and fancyFranci committed Apr 24, 2019
1 parent 11238f2 commit 84ae714
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ public function getCoreFile($file, $client_id)
*/
private function getSafeName($name)
{
if (preg_match('/[0-9]/', $name))
if (strpos($name, '-') !== false && preg_match('/[0-9]/', $name))
{
// Get the extension
$extension = File::getExt($name);
Expand Down

0 comments on commit 84ae714

Please sign in to comment.