回答編集履歴
2
update
test
CHANGED
@@ -75,3 +75,7 @@
|
|
75
75
|
}
|
76
76
|
|
77
77
|
```
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
- [とっても簡単なCSRF対策](http://qiita.com/mpyw/items/8f8989f8575159ce95fc)
|
1
updated
test
CHANGED
@@ -54,7 +54,7 @@
|
|
54
54
|
|
55
55
|
|
56
56
|
|
57
|
-
public static function validate($token, $throw =
|
57
|
+
public static function validate($token, $throw = false)
|
58
58
|
|
59
59
|
{
|
60
60
|
|
@@ -62,7 +62,7 @@
|
|
62
62
|
|
63
63
|
if (!$success && $throw) {
|
64
64
|
|
65
|
-
throw new \RuntimeException('CSRF validation failed.');
|
65
|
+
throw new \RuntimeException('CSRF validation failed.', 400);
|
66
66
|
|
67
67
|
}
|
68
68
|
|