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

OwnCloud login impossible when HTTP_AUTH is set #4220

Closed
Gottox opened this issue Jul 28, 2013 · 8 comments
Closed

OwnCloud login impossible when HTTP_AUTH is set #4220

Gottox opened this issue Jul 28, 2013 · 8 comments
Assignees
Labels

Comments

@Gottox
Copy link

Gottox commented Jul 28, 2013

When OwnCloud is used in a httpauth protected folder, it isn't possible to login via webform anymore.

In our setup, we want to handle httpauth independent from OwnCloud.

We tried to workaround this issue by resetting the corresponding fields in $_SERVER by adding the following to the top of index.php:

unset($_SERVER['PHP_AUTH_USER']);
unset($_SERVER['PHP_AUTH_PW']);
$_SERVER['HTTP_AUTHORIZATION']="";
unset($_SERVER['HTTP_XAUTHORIZATION']);
unset($_SERVER['REDIRECT_HTTP_AUTHORIZATION']);

This made it possible to log in independent from httpauth, but unfortunately as soon as I navigate from the main page, I get back to the login prompt.

@Gottox
Copy link
Author

Gottox commented Jul 28, 2013

Update: I revert my changes for debugging, logged in to the http auth and tried to login into Owncloud with "remember me" set. This results in a redirection loop.

@butonic
Copy link
Member

butonic commented Jul 28, 2013

Basically using the basic auth credential to log in a user is a feature of owncloud, but I can confirm this issue. I had the same problem with a customer that used basic auth to protect his development system. It was not a big issue and I added a conditional hack like yours that would only unset PHP_AUTH_USER and PHP_AUTH_PW when it would match the basic auth credentials.

@karlitschek @icewind1991 opinions?

@Gottox
Copy link
Author

Gottox commented Jul 28, 2013

Thanks for the tip, unsetting PHP_AUTH_USER in lib/base.php did the job.

@bantu
Copy link

bantu commented Jul 29, 2013

@butonic Add an environment variable that allows disabling HTTP auth, so it can be used in the webserver only?

@ghost ghost assigned bantu Aug 3, 2013
@DeepDiver1975
Copy link
Member

@bantu no need for you to work on this - we have some developments already going on in this area.

@ghost ghost assigned DeepDiver1975 Aug 4, 2013
@VicDeo
Copy link
Member

VicDeo commented Nov 28, 2013

@DeepDiver1975 IIRC you fixed it, didn't you?

@DeepDiver1975
Copy link
Member

@DeepDiver1975 IIRC you fixed it, didn't you?

actually not - I missunderstood the original reporter - sorry

@karlitschek
Copy link
Contributor

closing this. This is the intended behavior of ownCloud.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants