aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/security
diff options
context:
space:
mode:
authorLukas Reschke <lukas@owncloud.com>2014-09-12 13:32:59 +0200
committerLukas Reschke <lukas@owncloud.com>2014-09-12 13:34:45 +0200
commit5ff999d69d89aecfd946aab367914a5161ac1efd (patch)
treeaf97fb258c8251e8550df14004c590d169d5dc4c /lib/private/security
parent7afca08255ef8cd034f76fa108fa82390eaab2fb (diff)
downloadnextcloud-server-5ff999d69d89aecfd946aab367914a5161ac1efd.tar.gz
nextcloud-server-5ff999d69d89aecfd946aab367914a5161ac1efd.zip
Return false in case one of the values is null
Diffstat (limited to 'lib/private/security')
-rw-r--r--lib/private/security/stringutils.php4
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);
}