Skip to content

Commit

Permalink
File name not properly checked against XSS #1116
Browse files Browse the repository at this point in the history
  • Loading branch information
Fasse committed Oct 20, 2021
1 parent 6b3820a commit 01a83d4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion adm_program/system/bootstrap/function.php
Expand Up @@ -392,7 +392,6 @@ function admFuncVariableIsValid(array $array, $variableName, $datatype, array $o
{
if ($value !== '')
{
$value = StringUtils::strStripTags(urldecode($value));
StringUtils::strIsValidFileName($value, false);
}
}
Expand Down
2 changes: 1 addition & 1 deletion adm_program/system/classes/StringUtils.php
Expand Up @@ -239,7 +239,7 @@ public static function strIsValidFileName($filename, $checkExtension = true)
(!self::strValidCharacters($filename, 'folder') && !$checkExtension)
)
{
throw new AdmException('SYS_FILENAME_INVALID', array($filename));
throw new AdmException('SYS_FILENAME_INVALID', array(StringUtils::strStripTags($filename)));
}

if ($checkExtension)
Expand Down

0 comments on commit 01a83d4

Please sign in to comment.