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

Missing header WWW-Authenticate in HTTP 401 response #27641

Closed
Excpt0r opened this issue Jun 23, 2021 · 3 comments
Closed

Missing header WWW-Authenticate in HTTP 401 response #27641

Excpt0r opened this issue Jun 23, 2021 · 3 comments
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: authentication needs info

Comments

@Excpt0r
Copy link

Excpt0r commented Jun 23, 2021

Steps to reproduce

Send HTTP Request to nextcloud, i.e.
curl -v https://yourcloud/index.php/apps/files/
curl -v https://yourcloud/ocs/v2.php/cloud/users

Expected behaviour

Response HTTP 401 is expected, together with HTTP header WWW-Authenticate.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/WWW-Authenticate
Past versions seemed to send this header:
#751

Actual behaviour

Response code 401 is returned, but without header WWW-Authenticate.

Server configuration

Database:
mysql
Version: 10.5.5
PHP version: 7.4.10

Nextcloud version: 20.0.10

Unrelated
Btw the git repository has a size of 1.7GB, where 1.6GB are only used for ".git", maybe that could be cleaned up.

@Excpt0r Excpt0r added 0. Needs triage Pending check for reproducibility or if it fits our roadmap bug labels Jun 23, 2021
@szaimen
Copy link
Contributor

szaimen commented Aug 8, 2021

Is this Issue still valid in NC21.0.4? If not, please close this issue. Thanks! :)

@Excpt0r
Copy link
Author

Excpt0r commented Aug 11, 2021

Hi @szaimen
Yes the problem is still valid with NC21.0.4

You can see how the behaviour SHOULD be, when you execute the following:
curl -v https://jigsaw.w3.org/HTTP/Basic/
One of the response headers is: www-authenticate: Basic realm="test"

Now test similar for NC:
curl -v -H "OCS-APIRequest: true" -H "Accept: application/json" http://yourcloud:port/ocs/v2.php/cloud/users
The result is no www-authenticate is set.

(Note that curl is only used for easy demonstration, and I know how to explicitly provide basic auth there.
But there are other http clients that need this header to be set correctly to use basic authentication)

@szaimen szaimen added 1. to develop Accepted and waiting to be taken care of feature: authentication and removed needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap labels Aug 17, 2021
@szaimen
Copy link
Contributor

szaimen commented Jan 23, 2023

Hi, please update to 24.0.9 or better 25.0.3 and report back if it fixes the issue. Thank you!

My goal is to add a label like e.g. 25-feedback to this ticket of an up-to-date major Nextcloud version where the bug could be reproduced. However this is not going to work without your help. So thanks for all your effort!

If you don't manage to reproduce the issue in time and the issue gets closed but you can reproduce the issue afterwards, feel free to create a new bug report with up-to-date information by following this link: https://github.com/nextcloud/server/issues/new?assignees=&labels=bug%2C0.+Needs+triage&template=BUG_REPORT.yml&title=%5BBug%5D%3A+

@szaimen szaimen added needs info 0. Needs triage Pending check for reproducibility or if it fits our roadmap and removed 1. to develop Accepted and waiting to be taken care of labels Jan 23, 2023
@szaimen szaimen closed this as completed Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0. Needs triage Pending check for reproducibility or if it fits our roadmap bug feature: authentication needs info
Projects
None yet
Development

No branches or pull requests

2 participants