summaryrefslogtreecommitdiffstats
path: root/cmd/web.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2016-03-12 20:56:03 -0500
committerUnknwon <u@gogs.io>2016-03-12 20:56:03 -0500
commitb4f47a762338abe6ce3a6e3d6d0896b8a387228d (patch)
tree5823198cf6e1c3cc05f061d7c463f4761a844e90 /cmd/web.go
parentaf8eccc02eaef5e6679dd15baf68492f25fb9f45 (diff)
downloadgitea-b4f47a762338abe6ce3a6e3d6d0896b8a387228d.tar.gz
gitea-b4f47a762338abe6ce3a6e3d6d0896b8a387228d.zip
#1891 attempt to fix invalid csrf token
Diffstat (limited to 'cmd/web.go')
-rw-r--r--cmd/web.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/web.go b/cmd/web.go
index 97bb03213b..3a63d0845d 100644
--- a/cmd/web.go
+++ b/cmd/web.go
@@ -81,12 +81,12 @@ func checkVersion() {
{"github.com/go-xorm/xorm", func() string { return xorm.Version }, "0.5.2.0304"},
{"github.com/go-macaron/binding", binding.Version, "0.2.1"},
{"github.com/go-macaron/cache", cache.Version, "0.1.2"},
- {"github.com/go-macaron/csrf", csrf.Version, "0.0.5"},
+ {"github.com/go-macaron/csrf", csrf.Version, "0.1.0"},
{"github.com/go-macaron/i18n", i18n.Version, "0.2.0"},
{"github.com/go-macaron/session", session.Version, "0.1.6"},
{"github.com/go-macaron/toolbox", toolbox.Version, "0.1.0"},
{"gopkg.in/ini.v1", ini.Version, "1.8.4"},
- {"gopkg.in/macaron.v1", macaron.Version, "1.1.1"},
+ {"gopkg.in/macaron.v1", macaron.Version, "1.1.2"},
{"github.com/gogits/git-module", git.Version, "0.2.9"},
{"github.com/gogits/go-gogs-client", gogs.Version, "0.7.3"},
}
@@ -158,6 +158,7 @@ func newMacaron() *macaron.Macaron {
m.Use(session.Sessioner(setting.SessionConfig))
m.Use(csrf.Csrfer(csrf.Options{
Secret: setting.SecretKey,
+ Cookie: setting.CSRFCookieName,
SetCookie: true,
Header: "X-Csrf-Token",
CookiePath: setting.AppSubUrl,