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

[stable18] Fix security header setting in .htaccess by adding 'onsuccess unset' #20647

Merged
merged 1 commit into from
Apr 29, 2020

Conversation

backportbot-nextcloud[bot]
Copy link

backport of #19002

The headers might already be set by the system administrator at the http server
level (apache or nginx) for some or all virtualhosts.

Using "always set" in the .htaccess of Nextcloud leads to the situation where
the headers might be set twice (once in the default 'onsuccess' table and once
in the 'always' table)! Which leads to warnings in the admin area.

Adding "onsuccess unset" solves the problem, and forces the header in
the 'onsucess' table to be unset, and the header in the 'always' table to be set.

NOTE: with this change, Nextcloud overrides whatever the system administrator
might have already set

See github issues #16893 #16476 #16938 #18017 and discussion in PR #19002

Signed-off-by: zertrin <zertrin@gmail.com>
@zertrin zertrin added the 3. to review Waiting for reviews label Apr 25, 2020
@zertrin zertrin added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Apr 29, 2020
@MorrisJobke MorrisJobke merged commit 277a97c into stable18 Apr 29, 2020
@MorrisJobke MorrisJobke deleted the backport/19002/stable18 branch April 29, 2020 12:59
@rullzer rullzer mentioned this pull request May 21, 2020
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants