|
@@ -37,13 +37,16 @@ class Session {
|
|
|
{
|
|
|
static::$exists = false;
|
|
|
|
|
|
+ static::$session = array('id' => Str::random(40), 'data' => array());
|
|
|
+ }
|
|
|
+
|
|
|
+ if ( ! static::has('csrf_token'))
|
|
|
+ {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- $csrf_token = Str::random(40);
|
|
|
-
|
|
|
- static::$session = array('id' => Str::random(40), 'data' => compact('csrf_token'));
|
|
|
+ static::put('csrf_token', Str::random(40));
|
|
|
}
|
|
|
}
|
|
|
|