ソースを参照

Use random string not bytes for CSRF token salt

Marc Würth 3 年 前
コミット
e384cdde11
1 ファイル変更1 行追加1 行削除
  1. 1 1
      src/Http/Middleware/CsrfProtectionMiddleware.php

+ 1 - 1
src/Http/Middleware/CsrfProtectionMiddleware.php

@@ -190,7 +190,7 @@ class CsrfProtectionMiddleware
      */
     public function createToken()
     {
-        $value = Security::randomBytes(static::TOKEN_VALUE_LENGTH);
+        $value = Security::randomString(static::TOKEN_VALUE_LENGTH);
         if (!$this->_config['verifyTokenSource']) {
             return hash('sha512', $value, false);
         }