Merge pull request #11043 from owncloud/test-againstNull

Return false in case the passed values are not of type string
remotes/origin/fix-10825
Clark Tomlinson 2014-09-12 09:42:42 +07:00
commit cfd8b3f976
1 changed files with 4 additions and 0 deletions

@ -25,6 +25,10 @@ class StringUtils {
*/
public static function equals($expected, $input) {
if(!is_string($expected) || !is_string($input)) {
return false;
}
if(function_exists('hash_equals')) {
return hash_equals($expected, $input);
}