소스 검색

[Form] fixed default CSRF token generation as a token must be tied to the user somewhat

Fabien Potencier 14 년 전
부모
커밋
d326c398e2
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      src/Symfony/Component/Form/Form.php

+ 1 - 1
src/Symfony/Component/Form/Form.php

@@ -60,7 +60,7 @@ class Form extends FieldGroup
         if (self::$defaultCsrfSecret !== null) {
             $this->setCsrfSecret(self::$defaultCsrfSecret);
         } else {
-            $this->setCsrfSecret(md5(__FILE__.php_uname()));
+            $this->setCsrfSecret(md5(__FILE__.session_id()));
         }
 
         if (self::$defaultCsrfProtection !== false) {