Commit Graph

157 Commits

Author SHA1 Message Date
Côme Chilliet 15fb15bc14 chore(index.php): Use strict_types and Server::get in index.php
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-12 09:22:32 +01:00
Joas Schilling e5e139f5a6
fix(bruteforce-protection): Don't throw a 500 when MaxDelayReached is thrown
Signed-off-by: Joas Schilling <coding@schilljs.com>
2023-11-30 15:01:27 +01:00
fenn-cs bb2c2bb7f0 Replace ILogger method calls index.php
This commit replaces more ILogger method calls with
 `Psr\Log\LoggerInterface` as we gradually move away from the
 custom ILogger.

This commit aslo, sets the customPsrLogger to not depend on the
 database to `logfile` config value.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
2023-05-22 15:17:04 +01:00
Carl Schwan 6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +01:00
Gary Kim b78f3a57d1
Migrate HintException to OCP
Signed-off-by: Gary Kim <gary@garykim.dev>
2021-06-30 15:28:02 -04:00
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +02:00
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