Commit Graph

151 Commits

Author SHA1 Message Date
Joas Schilling 236f1b64f9
Reply with JSON when html is not accepted like in SecurityMiddleware
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-12 08:02:53 +02:00
Joas Schilling a2d5d2d613
Reply with UNAUTHORIZED like on APIs when login exception was thrown
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-05-12 08:02:53 +02:00
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-12-16 18:48:22 +01:00
Christoph Wurst caff1023ea
Format control structures, classes, methods and function
To continue this formatting madness, here's a tiny patch that adds
unified formatting for control structures like if and loops as well as
classes, their methods and anonymous functions. This basically forces
the constructs to start on the same line. This is not exactly what PSR2
wants, but I think we can have a few exceptions with "our" style. The
starting of braces on the same line is pracrically standard for our
code.

This also removes and empty lines from method/function bodies at the
beginning and end.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 14:19:56 +02:00
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +02:00
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +01:00
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +01:00
paul 38eccce224
Update index.php
Linking to NC 15 documentation instead of NC 13
2019-03-07 22:05:38 +01:00
Morris Jobke affdb0e4d1
Log the previous exception during hard failure
* otherwise the exception that was caused by the template is logged

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-11-01 22:27:56 +01:00
Morris Jobke 478b95cc20
Try to not run into the white page of death and still log something in the web server error log
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-06-29 11:22:05 +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
Marius Blüm a64aad9c4b
Add PHP missing message to index.php
Signed-off-by: Marius Blüm <marius@lineone.io>
2018-05-08 12:01:08 +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
Roeland Jago Douma 469db9fbb9
Merge pull request #7073 from nextcloud/no-whitepage-of-death
Show proper error page even if the config.php has syntax errors
2017-11-07 16:28:06 +01:00
Morris Jobke 31c5c2a592
Change @georgehrke's email
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 20:38:59 +01:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +01:00
Morris Jobke 68dbf94470
Show proper error page even if the config.php has syntax errors
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 09:36:19 +01:00
Morris Jobke 11c31e94fe
Improve exception handling
If there is an exception in the template handling then a white page is shown.
This improves the handling of this and shows text only about the internal
error.

To test this just setup redis as cache and then disable the php-redis module.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-09-26 13:54:51 +02:00
Morris Jobke fc75993f8f
fix wrong method name
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2016-10-20 17:24:07 +02:00
Sergio Bertolín 0417cbafd0
Changed request to not add a prefix to the url (#26256)
* Changed request to not add a prefix to the url

* Expecting forbidden instead of service unavailable

* Handling login exceptions
2016-10-20 17:21:08 +02:00
Georg Ehrke a48aed2ee9
use older php array syntax in index.php 2016-10-07 20:24:47 +02: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
Lukas Reschke b7decc52e9
Master supports PHP 7.1 2016-09-08 09:20:33 +02:00
Lukas Reschke 5e10284e34
Proper branding 2016-08-30 18:27:44 +02:00
Lukas Reschke 4212ffbdac
Show error if PHP version below 5.6 is used 2016-08-30 18:26:48 +02:00
Lukas Reschke c59c462344
Nextcloud is not compatible with PHP 7.1
Make the code fail hard before people update and then experience some half-broken stuff. See also https://github.com/nextcloud/docker-ci/issues/10
2016-08-10 14:30:19 +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
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
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
Jenkins for ownCloud 6a1a4880f0 Updating license headers 2015-02-23 12:13:59 +01:00
Lukas Reschke dc9c5ecdba Show warning for PHP versions older than 5.4.0
We can't check the PHP version in the installer since base.php already used 5.4 syntax. Thus for a better UX we show a simple warning instead of a fatal PHP error.
2015-02-05 11:41:00 +01:00
Lukas Reschke 2d2a4741ce Make files non executable
There is not much sense in having these files marked executable, we should avoid that.
2014-10-24 11:14:51 +02:00
Lukas Reschke 6d3757f864 Do not show exception to the end-user
Log the error instead of potentially leaking sensitive information
2014-09-17 13:17:52 +02:00
Robin Appelman a05147e25c handle service not available exceptions in index, remote and public.php 2014-08-04 13:41:04 +02:00
Thomas Müller afbe50d09c remove global variable $RUNTIME_NOAPPS - it's just superfluous 2014-02-06 09:44:13 +01:00
Vincent Petry c4dee281e6 Added $app parameter to logException 2013-10-23 13:58:42 +02:00
Vincent Petry 42c58220de Moved logException to OCP\Util class 2013-10-23 10:48:27 +02:00
Vincent Petry 83956b1703 Expand exception stack trace in log in debug mode 2013-10-22 19:17:41 +02:00
Thomas Müller 5acb3c4c0d first log the exception 2013-09-15 21:20:22 +02:00
Jörn Friedrich Dreyer 9c9bfcd626 log as index, not remote 2013-06-25 17:45:42 +03:00
Jörn Friedrich Dreyer 8dc6bdd96b clean up usage of DatabaseSetupException and catch Exceptions in entrypoints 2013-06-10 13:45:19 +02:00
Felix Moeller ddfcc96ab5 Checkstyle: LowerCaseConstant 2012-10-23 08:20:17 +02:00