Commit Graph

52 Commits

Author SHA1 Message Date
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
Maxence Lange 22b141525f testing process
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2019-08-29 16:21:16 -01:00
Maxence Lange fb7840b283
returns a 501 instead of exception if app is not installed - #13088
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2018-12-19 07:41:25 +01:00
Joas Schilling f64bd62f8e Return 404 when the service is not available
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-10-10 13:01:23 +02:00
Morris Jobke b0a296e2e1
Do not use HTTP code OC_Response constants anymore
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-06-26 16:14:15 +02:00
Morris Jobke 79d9841bce
Replace hardcoded status headers with calls to http_response_code()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-06-26 16:14:15 +02:00
Morris Jobke 1399f6bece
Server exception error pages by default with a 500 status code
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-06-26 11:44:24 +02:00
Morris Jobke 8c155cd51c
Server error/hint pages with a 500 error code to avoid it being seen instead of the actual resource
* found while reviewing #7205
* allow to specify a special status code

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-06-26 11:44:24 +02:00
Roeland Jago Douma b8af7ee9bc
Nextcloud 13 is not compatible with newer than php 7.2
Just to avoid users from trying this with a to new (untested) php version

* Moved the check logic to 1 place
* All directly callable scripts just require this on top
* exit hard (-1) so we know scripts won't continue
* Return status 500 so no sync clients will try fancy stuff

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-12-12 10:55:09 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Lukas Reschke 5424d6a40d
Add proper PHPDoc
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:15 +02:00
Morris Jobke 9533f4e5ed
Clean up single user mode
Single user mode basically disables WebDAV, OCS and cron execution. Since
we heavily rely on WebDAV and OCS also in the web UI it's basically useless.
An admin only sees a broken interface and can't even change any settings nor
sees any files. Also sharing is not possible.

As this is at least the case since Nextcloud 9 and we haven't received any
reports for this it seems that this feature is not used at all so I removed it.

The encryption commands now rely on the well tested maintenance mode.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-02-22 23:02:31 -06:00
Joas Schilling f3319f6294
Allow to call the files even when you are in another instance atm
Signed-off-by: Joas Schilling <coding@schilljs.com>
2016-10-06 12:15:13 +02:00
Joas Schilling 0215b004da
Update with robin 2016-07-21 18:13:58 +02:00
Joas Schilling ba87db3fcc
Fix others 2016-07-21 18:13:57 +02:00
Morris Jobke 2791b8f00d Revert "occ web executor (#24957)"
This reverts commit 854352d9a0.
2016-07-07 12:14:45 +02:00
VicDeo 854352d9a0 occ web executor (#24957)
* Initial web executor

* Fix PHPDoc

Fix broken integration test

OccControllerTests do not require database access - moch them all!

Kill unused sprintf
2016-06-22 13:12:36 +02:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Thomas Müller 6a6fc742dc Catch class Error on all root entrypoints 2016-04-20 18:01:47 +02:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Morris Jobke b945d71384 update licence headers via script 2015-10-05 21:15:52 +02:00
Morris Jobke f63915d0c8 update license headers and authors 2015-06-25 14:13:49 +02:00
Thomas Müller a33edcd2f0 Fix singe user mode on public.php - take two 2015-04-10 11:17:33 +02:00
Jenkins for ownCloud b585d87d9d Update license headers 2015-03-26 11:44:36 +01:00
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
2015-02-26 11:37:37 +01:00
Thomas Müller 0cdc2cebbf Merge pull request #14433 from owncloud/fix-public-php
Use `getParam` instead of `server`
2015-02-23 22:43:51 +01:00
Lukas Reschke 615bc5a827 Use `getParam` instead of `server`
`server` is completely wrong here and this will not work on master. With `getParam` it will work fine though.

Testplan:
- [ ] Without patch: Share a file and try to access `http://localhost/public.php?service=files&t=THESHAREDTOKEN` => Fails
- [ ] With patch: Try the same => Works

Master only.
2015-02-23 14:07:42 +01:00
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Lukas Reschke 886bda5f81 Refactor OC_Request into TrustedDomainHelper and IRequest
This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed.

This changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions.

Unfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though.

Fixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969
2015-02-16 22:13:00 +01:00
Robin Appelman 7cb12d4bff Add sabredav plugin to check if a user has access to an app 2014-11-17 15:50:24 +01:00
Robin Appelman a05147e25c handle service not available exceptions in index, remote and public.php 2014-08-04 13:41:04 +02:00
Vincent Petry 44c1dc8153 Fix service warning 2014-07-02 15:30:34 +02:00
Vincent Petry 2e45eb8ad6 Return 503 in public.php and OCS API when upgrade is due
To prevent unexpected behavior, public.php and the OCS API calls will
return 503 Service Unavailable when an upgrade is due.
2014-06-30 14:48:03 +02:00
Lukas Reschke 7c4abce373 Move authentication to it's own call 2014-06-05 11:45:45 +02:00
Lukas Reschke ac7fb1b23e Remove legacy routing code
The getfile routing code was absolutely legacy and not needed anymore. Additionally \OC::$REQUESTEDAPP was never set to the actually accessed application.

This commit removes the legacy routing code and ensures that $REQUESTEDAPP is always set so that other applications (e.g. the firewall or a two-factor authentication) can intercept the currently accessed app.

Testplan:
[x] Installation works
[x] Login with DB works
[x] Logout works
[x] Login with alternate backend works (tested with user_webdavauth)
[x] Other apps are accessible
[x] Redirect on login works (e.g. index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fapps%3Finstalled)
[x] Personal settings are accessible
[x] Admin settings are accessible
[x] Sharing files works
[x] DAV works
[x] OC::$REQUESTEDAPP contains the requested application and can be intercepted by other applications
2014-06-05 11:45:45 +02:00
icewind1991 d3eee01190 Merge pull request #7599 from owncloud/public-pathinfo
Allow using pathinfo based public.php paths
2014-04-07 14:53:44 +02:00
Robin Appelman 0f1374c028 Allow using pathinfo based public.php paths 2014-03-06 16:01:13 +01:00
Thomas Müller 0db5fead8e remove some more global variable $RUNTIME_NOAPPS 2014-02-06 10:04:18 +01:00
Robin Appelman 71c1327691 Add "single user mode" which restricts access to users in the admin group
This can be enabled by setting 'singleuser' to true in config.php
2013-11-25 15:08:24 +01:00
Bjoern Schiessle 2cc0c90015 set incognito mode for public.php calls. Because in this case ownCloud should always work the same way as if no user is logged in 2013-11-22 14:00:08 +01:00
kondou 9e8a6b704d Add _many_ newlines at the end of files 2013-08-18 11:06:59 +02:00
Jörn Friedrich Dreyer 8dc6bdd96b clean up usage of DatabaseSetupException and catch Exceptions in entrypoints 2013-06-10 13:45:19 +02:00
Georg Ehrke ce14788ac0 public.php - check if maintenance mode is enabled 2013-06-03 12:57:47 +02:00
Felix Moeller 2d61f03452 More Checkstyle cleanup
This is for all LowerCaseConstant warnings
2012-10-23 08:01:09 +02:00
Thomas Müller cfa2fded05 Update public.php
respect coding style
2012-09-04 12:10:26 +03:00
Michael Gapczynski e05db00468 404 if service is not set for public.php 2012-08-28 11:13:02 -04:00
Bart Visscher 7522a23693 Remove unused RUNTIME_NOSETUPFS var 2012-08-08 22:42:50 +02:00
Robin Appelman b45d3ced79 fix remote and public.php 2012-07-13 22:44:35 +02:00
Bart Visscher 153ee9dcfa Check if app is enabled before loading in remote and public.php 2012-06-27 01:05:12 +02:00
Brice Maron 6a812644e4 Correct remote and public, and last occurence of OC:: 2012-06-06 20:24:15 +00:00