Skip to content

Create HTTP_Authorization header when none exists - #13403

Closed
LukasReschke wants to merge 1 commit into
masterfrom
fix-13398
Closed

LukasReschke wants to merge 1 commit into
masterfrom
fix-13398

Conversation

@LukasReschke

Copy link
Copy Markdown
Contributor

This is an unbelievable hacky workaround for #13398, the issue there was that when using PHP-FPM and having either our .htaccess not enabled or mod_rewrite is not enabled no basic auth headers were passed.

This failed when a login was tried without a password since SabreDAV only uses credentials in PHP_AUTH_USER and PHP_AUTH_PW when both are not null. In all other cases the Authorization header is decoded. However, PHP-FPM strips it and thus the login failed and S2S was horribly broken.

This is an unbelievable hacky workaround for #13398, the issue there was that when using PHP-FPM and having either our .htaccess not enabled or mod_rewrite is not enabled no basic auth headers were passed.

This failed when a login was tried without a password since SabreDAV only uses credentials in PHP_AUTH_USER and PHP_AUTH_PW when both are not null. In all other cases the Authorization header is decoded. However, PHP-FPM strips it and thus the login failed and S2S was horribly broken.
@LukasReschke

Copy link
Copy Markdown
Contributor Author

@schiesbn @craigpg @jnfrmarks FYI

@LukasReschke

Copy link
Copy Markdown
Contributor Author

@schiesbn However, the external mount should when it throws an exception certainly not react that way!

Please add exception handling to your code. Otherwise this requires the other oC instance to never fail ;-)

@LukasReschke

Copy link
Copy Markdown
Contributor Author

An alternative would be to enforce mod_rewrite

@DeepDiver1975 FYI

@ghost

ghost commented Jan 15, 2015

Copy link
Copy Markdown

Refer to this link for build results (access rights to CI server needed):
https://ci.owncloud.org//job/pull-request-analyser-ng-simple/7002/
👍 Test PASSed. 👍

@MorrisJobke

Copy link
Copy Markdown
Contributor

I could reproduce this and this fixed it. 👍

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 3 new issues, 1 updated code elements

@LukasReschke

Copy link
Copy Markdown
Contributor Author

We don't need that hack if we apply https://github.com/fruux/sabre-dav/issues/596 on our SabreDAV

@DeepDiver1975 Any objections?

@LukasReschke LukasReschke added this to the 8.0-current milestone Jan 19, 2015
@LukasReschke

Copy link
Copy Markdown
Contributor Author

Okay, apparently we effectively require to backport https://github.com/fruux/sabre-dav/issues/596 … PR coming …

@LukasReschke
LukasReschke deleted the fix-13398 branch January 19, 2015 19:13
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants