瀏覽代碼

Fix strict comparison of the content hash

Zsolt Szeberenyi 9 年之前
父節點
當前提交
62630e5c69
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/Composer/Package/Locker.php

+ 1 - 1
src/Composer/Package/Locker.php

@@ -89,7 +89,7 @@ class Locker
 
 
         if (!empty($lock['content-hash'])) {
         if (!empty($lock['content-hash'])) {
             // There is a content hash key, use that instead of the file hash
             // There is a content hash key, use that instead of the file hash
-            return $this->contentHash == $lock['content-hash'];
+            return $this->contentHash === $lock['content-hash'];
         }
         }
 
 
         return $this->hash === $lock['hash'];
         return $this->hash === $lock['hash'];