Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
e79d756d
Commit
e79d756d
authored
Sep 28, 2013
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#230
parent
904b3703
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
9 deletions
+1
-9
controller.go
controller.go
+1
-9
No files found.
controller.go
View file @
e79d756d
...
...
@@ -375,16 +375,8 @@ func (c *Controller) CheckXsrfCookie() bool {
}
func
(
c
*
Controller
)
XsrfFormHtml
()
string
{
var
expire
int64
if
c
.
XSRFExpire
>
0
{
expire
=
int64
(
c
.
XSRFExpire
)
}
else
{
expire
=
int64
(
XSRFExpire
)
}
token
:=
GetRandomString
(
15
)
c
.
SetSecureCookie
(
XSRFKEY
,
"_xsrf"
,
token
,
expire
)
return
"<input type=
\"
hidden
\"
name=
\"
_xsrf
\"
value=
\"
"
+
token
+
"
\"
/>"
c
.
_xsrf_
token
+
"
\"
/>"
}
func
(
c
*
Controller
)
GoToFunc
(
funcname
string
)
{
...
...
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