Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/syncthing: Add some common security releated HTTP headers (fixes #4360) #4361

Closed
wants to merge 3 commits into from

Conversation

calmh
Copy link
Member

@calmh calmh commented Sep 10, 2017

These:

  1. X-Frame-Options: SAMEORIGIN
  2. X-XSS-Protection: 1; mode=block
  3. X-Content-Type-Options: nosniff
  4. Content-Type: text/html; charset=utf-8

Number 4 we already do of course, but I sprinkled some utf-8 where appropriate.

Numbers 2-3 are uncontroversial and shouldn't do any harm.

Number 1 might be an issue. Potentially for apps that wrap Syncthing (@Nutomic, @kozec, @canton7), also I recall from forums that there are people who have their own web pages that load the Syncthing UI in a part of them. I added a new GUI config option InsecureAllowFrameLoading to turn off this header.

@AudriusButkevicius
Copy link
Member

@st-review merge

@st-review
Copy link

👌 Merged as 429cc20. Thanks, @calmh!

@st-review st-review closed this Sep 10, 2017
st-review pushed a commit that referenced this pull request Sep 10, 2017
@st-review st-review added the pr-merged Legacy label used in the past for pull requests merged to the main tree label Jan 15, 2018
@calmh calmh deleted the headers branch January 15, 2018 13:50
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Sep 11, 2018
@syncthing syncthing locked and limited conversation to collaborators Sep 11, 2018
@calmh calmh restored the headers branch November 1, 2018 06:07
@calmh calmh deleted the headers branch March 23, 2020 07:13
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion pr-merged Legacy label used in the past for pull requests merged to the main tree
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants