]> source.dussan.org Git - nextcloud-server.git/commit
Verify authentication before initializing apps and routing
authorLukas Reschke <lukas@owncloud.com>
Fri, 9 Jan 2015 19:59:23 +0000 (20:59 +0100)
committerLukas Reschke <lukas@owncloud.com>
Fri, 9 Jan 2015 20:07:29 +0000 (21:07 +0100)
commit1c75b73239348f5c21846c502e563ffbf679f156
treeb3d728e4bc9a616fb03cc02ab6cd259a08b1e655
parent59a1d16d0fd3d67833bfb728ce03cebc7fec4043
Verify authentication before initializing apps and routing

The current behaviour of the authenticion logic in base.php prevents REST APIs in ownCloud applications to work.

Because `!self::$CLI` is usually always a true statement the previously above block was entered which returned, thus the authentication logic for this part does not trigger in.

This can be reproduced by installing apps such as the News app and issuing the following command:

`curl -u admin:admin http://localhost/index.php/apps/news/api/v1-2/feeds`

The following parts needs to get throughly tested:

- [ ] OCS
- [ ] remote.php's DAV features
- [ ] Regular login features

This bug affects master and stable7. I'd propose that we merge this for 8.0 since this has the potential to break every component that relies on Basic Auth features. A backport would also be very nice.

Remark to myself: We really need to move out the authentication code for 8.1 out of base.php - I already have a local branch that does that somewhere which I will get in shape for 8.1... - This untested code is a night-mare.

Fixes itself.
lib/base.php