Merge pull request #11043 from owncloud/test-againstNull
Return false in case the passed values are not of type string
This commit is contained in:
commit
cfd8b3f976
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue