[PR #3839] [MERGED] Support secure cookie for csrf-token #17106

Closed
opened 2025-11-02 12:26:26 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/3839
Author: @AleksandrBulyshchenko
Created: 4/23/2018
Status: Merged
Merged: 5/21/2018
Merged by: @lafriks

Base: masterHead: csrf-security


📝 Commits (2)

  • 828ac72 dep: Update github.com/go-macaron/csrf
  • c8d7625 routers: set csrf-token security depending on COOKIE_SECURE

📊 Changes

3 files changed (+21 additions, -8 deletions)

View changed files

📝 Gopkg.lock (+2 -1)
📝 routers/routes/routes.go (+1 -0)
📝 vendor/github.com/go-macaron/csrf/csrf.go (+18 -7)

📄 Description

Fixes #1734

Currently SetCookie for csrf has secure hardcodded to false.
This passes security argument to cookie creation and set it by COOKIE_SECURE config var.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/3839 **Author:** [@AleksandrBulyshchenko](https://github.com/AleksandrBulyshchenko) **Created:** 4/23/2018 **Status:** ✅ Merged **Merged:** 5/21/2018 **Merged by:** [@lafriks](https://github.com/lafriks) **Base:** `master` ← **Head:** `csrf-security` --- ### 📝 Commits (2) - [`828ac72`](https://github.com/go-gitea/gitea/commit/828ac721009f55de756685341982c9372c995781) dep: Update github.com/go-macaron/csrf - [`c8d7625`](https://github.com/go-gitea/gitea/commit/c8d76255eda4f81d27998f6ad6e194944baa612e) routers: set csrf-token security depending on COOKIE_SECURE ### 📊 Changes **3 files changed** (+21 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `Gopkg.lock` (+2 -1) 📝 `routers/routes/routes.go` (+1 -0) 📝 `vendor/github.com/go-macaron/csrf/csrf.go` (+18 -7) </details> ### 📄 Description Fixes #1734 Currently SetCookie for csrf has secure hardcodded to false. This passes security argument to cookie creation and set it by COOKIE_SECURE config var. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:26:26 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#17106