aboutsummaryrefslogtreecommitdiffstats
path: root/routers/user/setting/profile.go
diff options
context:
space:
mode:
authorSagePtr <sageptr@gmail.com>2018-08-14 22:16:37 +0200
committerLauris BH <lauris@nix.lv>2018-08-14 23:16:37 +0300
commit0449330dbce812e67f3309c11e265eb6a5bc0c7e (patch)
tree92669658438500567ad0c5805708807d9a5d79aa /routers/user/setting/profile.go
parentca112f0a04ea7f4fdb8e6dc1e83e293a598abc50 (diff)
downloadgitea-0449330dbce812e67f3309c11e265eb6a5bc0c7e.tar.gz
gitea-0449330dbce812e67f3309c11e265eb6a5bc0c7e.zip
Make cookies HttpOnly and obey COOKIE_SECURE flag (#4706)
Diffstat (limited to 'routers/user/setting/profile.go')
-rw-r--r--routers/user/setting/profile.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/routers/user/setting/profile.go b/routers/user/setting/profile.go
index 6a2eacd09d..09073498f8 100644
--- a/routers/user/setting/profile.go
+++ b/routers/user/setting/profile.go
@@ -103,7 +103,7 @@ func ProfilePost(ctx *context.Context, form auth.UpdateProfileForm) {
}
// Update the language to the one we just set
- ctx.SetCookie("lang", ctx.User.Language, nil, setting.AppSubURL)
+ ctx.SetCookie("lang", ctx.User.Language, nil, setting.AppSubURL, "", setting.SessionConfig.Secure, true)
log.Trace("User settings updated: %s", ctx.User.Name)
ctx.Flash.Success(i18n.Tr(ctx.User.Language, "settings.update_profile_success"))