nextcloud / server

☁️ Nextcloud server, a safe home for all your data
https://nextcloud.com
GNU Affero General Public License v3.0
27.42k stars 4.07k forks source link

/ocs/v1.php/cloud/users/ stopped working #1263

Closed oparoz closed 8 years ago

oparoz commented 8 years ago
### Steps to reproduce https://docs.nextcloud.com/server/10/admin_manual/configuration_user/user_provisioning_api.html?highlight=provision#users-getuser 1. `$I->amHttpAuthenticated("admin","admin")` 2. `$I->sendGET("/ocs/v1.php/cloud/users/tester")` ### Expected behaviour Should work like on ownCloud `$I->seeResponseCodeIs(200)` ### Actual behaviour `[Fail] Failed asserting that 412 matches expected 200.` ### Server configuration **Operating system**: Travis CI **Web server:** Apache **Database:** Any **PHP version:** Any **Nextcloud version:** master **Updated from an older Nextcloud/ownCloud or fresh install:** fresh **Where did you install Nextcloud from:** admin script --- Any idea @LukasReschke
rullzer commented 8 years ago

You need to pass the header OCS-APIREQUEST: true I'll make sure this is reflected in the docs.

rullzer commented 8 years ago

See https://github.com/nextcloud/documentation/pull/158

rullzer commented 8 years ago

Docs merged.

oparoz commented 8 years ago

There is still a problem as this deviates from the standard: https://www.freedesktop.org/wiki/Specifications/open-collaboration-services-1.7/

Which means that any client following the standard will stop working with these changes.

@karlitschek , how do we fix this?

LukasReschke commented 8 years ago

The standard as described at https://www.freedesktop.org/wiki/Specifications/open-collaboration-services-1.7/ is anyways not properly implemented in Nextcloud nor ownCloud. The specification at https://github.com/cernbox/OpenCloudMeshSpecification is more up-to-date and mentions this fact.

Also, all clients do properly send that header. Removing that requirement introduces security holes 🙈

oparoz commented 8 years ago

Perfect, thank you.