]> source.dussan.org Git - nextcloud-server.git/commitdiff
Return false in case one of the values is null
authorLukas Reschke <lukas@owncloud.com>
Fri, 12 Sep 2014 11:32:59 +0000 (13:32 +0200)
committerLukas Reschke <lukas@owncloud.com>
Fri, 12 Sep 2014 11:34:45 +0000 (13:34 +0200)
lib/private/security/stringutils.php

index 33a3a7080123e1e418d7505feeb1001f34caee69..ecba655ebd65ac9d109205a240138d2f4fb383dd 100644 (file)
@@ -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);
                }