1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-04-21 00:02:18 +02:00

Merge pull request #3532 from prototech/ticket/13755

[ticket/13755] Ignore dots in path when determining file extension.
This commit is contained in:
Marc Alexander 2015-04-26 09:24:03 +02:00
commit 59a178f3cb
2 changed files with 4 additions and 0 deletions

View File

@ -213,6 +213,8 @@ class filespec
*/
static public function get_extension($filename)
{
$filename = utf8_basename($filename);
if (strpos($filename, '.') === false)
{
return '';

View File

@ -213,6 +213,8 @@ class phpbb_filespec_test extends phpbb_test_case
array('file.phpbb.gif', 'gif'),
array('file..', ''),
array('.file..jpg.webp', 'webp'),
array('/test.com/file', ''),
array('/test.com/file.gif', 'gif'),
);
}