-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Problem with authentication headers #13398
Comments
This specific error in this case is caused by https://github.com/owncloud/3rdparty/blob/master/sabre/dav/lib/Sabre/DAV/Auth/Backend/AbstractBasic.php#L71-L74 if (!$userpass) {
$auth->requireLogin();
throw new DAV\Exception\NotAuthenticated('No basic authentication headers were found');
} Because the password is an empty value… digging further… |
On my local machine:
The difference here is the I'm wondering why the Anyways, I'll come up with a patch that somehow populates |
This is actually caused by PHP-FPM stripping the Lines 4 to 7 in 36ced1f
However, for that to work |
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.
Unbelievable hacky patch: #13403 |
Hi Lukas, That patch should not make a difference. https://github.com/fruux/sabre-dav/blob/1.8/lib/Sabre/HTTP/BasicAuth.php#L30 |
@evert Yes! - But |
For server-to-server sharing we just have a long random token as username |
You shouldn't abuse basic oauth for this then :) Just come up with your own scheme:
However, I guess this could be considered a sabredav bug then. The check for existence of |
@schiesbn @DeepDiver1975 Any thoughts about the above? ^ |
This is a backport of https://github.com/fruux/sabre-dav/issues/596 to the version used by ownCloud. Without this S2S is not working in some server environments. This patch has been confirmed to work by @jnfrmarks. Fixes owncloud/core#13398
like own token thingy? maybe - relates to many other things (session revokation, token based api access ....) - we shall chat about this at the next meeting |
Created #13622 to track this |
While demoing S2S with @jnfrmarks, @craigpg and @schiesbn today we found that S2S was completely broken in this setup using PHP-FPM.
As far I can see the remote server is not properly reading the user from the Basic Auth Header and thus is failing completely.
I'm on it.
I'm on it.
The text was updated successfully, but these errors were encountered: