Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
b7b5bc69
Commit
b7b5bc69
authored
Nov 23, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change csrf_token constant.
parent
d82f1d40
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
payload.php
laravel/session/payload.php
+5
-5
No files found.
laravel/session/payload.php
View file @
b7b5bc69
...
...
@@ -41,7 +41,7 @@ class Payload {
*
* @var string
*/
const
token
=
'csrf_token'
;
const
csrf_
token
=
'csrf_token'
;
/**
* Create a new session payload instance.
...
...
@@ -82,9 +82,9 @@ class Payload {
// class and the "csrf" filter to protect the application from cross-site
// request forgery attacks. The token is simply a long, random string
// which should be posted with each request.
if
(
!
$this
->
has
(
Payload
::
token
))
if
(
!
$this
->
has
(
Payload
::
csrf_
token
))
{
$this
->
put
(
Payload
::
token
,
Str
::
random
(
40
));
$this
->
put
(
Payload
::
csrf_
token
,
Str
::
random
(
40
));
}
}
...
...
@@ -251,7 +251,7 @@ class Payload {
*/
public
function
token
()
{
return
$this
->
get
(
Payload
::
token
);
return
$this
->
get
(
Payload
::
csrf_
token
);
}
/**
...
...
@@ -324,4 +324,4 @@ class Payload {
Cookie
::
put
(
$cookie
,
$this
->
session
[
'id'
],
$minutes
,
$path
,
$domain
,
$secure
);
}
}
\ No newline at end of file
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment