diff options
author | Clark Tomlinson <fallen013@gmail.com> | 2014-09-12 09:42:42 -0400 |
---|---|---|
committer | Clark Tomlinson <fallen013@gmail.com> | 2014-09-12 09:42:42 -0400 |
commit | cfd8b3f9761aed5026c064e2040b576d6178979c (patch) | |
tree | f9733db701bd8faa43e9fa3b9cb82f7cb6c03f69 /lib | |
parent | d6834b6389b256282b475d22f023c83f5f5e88ba (diff) | |
parent | 5ff999d69d89aecfd946aab367914a5161ac1efd (diff) | |
download | nextcloud-server-cfd8b3f9761aed5026c064e2040b576d6178979c.tar.gz nextcloud-server-cfd8b3f9761aed5026c064e2040b576d6178979c.zip |
Merge pull request #11043 from owncloud/test-againstNull
Return false in case the passed values are not of type string
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/security/stringutils.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/security/stringutils.php b/lib/private/security/stringutils.php index 33a3a708012..ecba655ebd6 100644 --- a/lib/private/security/stringutils.php +++ b/lib/private/security/stringutils.php @@ -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); } |