aboutsummaryrefslogtreecommitdiffstats
path: root/lib/base.php
Commit message (Collapse)AuthorAgeFilesLines
* extend the reference API for the new link pickerJulien Veyssier2023-01-271-0/+5
| | | | | | | | | - add 2 interfaces for discoverable and searchable reference providers - new OCS route to get info on discoverable/searchable reference providers - new abstract ADiscoverableReferenceProvider that only implements jsonSerialize - listen to RenderReferenceEvent to inject provider list with initial state Signed-off-by: Julien Veyssier <julien-nc@posteo.net>
* fix(session): Always setup the session if a session cookie is passedJulius Härtl2022-12-221-1/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Do not setup a session when not required on WebDAV requestsJulius Härtl2022-12-211-5/+15
| | | | | | | | | | If basic auth is used on WebDAV endpoints, we will not setup a session by default but instead set a test cookie. Clients which handle session cookies properly will send back the cookie then on the second request and a session will be initialized which can be resued for authentication. Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Strong type singletons from lib/base.phpCôme Chilliet2022-12-191-12/+4
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Migrate lib/base.php to LoggerInterfaceCôme Chilliet2022-12-191-6/+5
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Put back cast to string now that timelimit is an intCôme Chilliet2022-12-191-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fixing more psalm errors from lib/base.phpCôme Chilliet2022-12-191-32/+31
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use Server::get some moreCôme Chilliet2022-12-191-39/+38
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Use strict typing in base.phpCôme Chilliet2022-12-191-49/+42
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Set apcu prefix for composerJulius Härtl2022-12-071-0/+1
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Refactor the ErrorHandler into a dynamic classChristoph Wurst2022-11-021-3/+14
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use proper error pages instead of always redirectingJulius Härtl2022-10-211-9/+23
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #33737 from andyxheli/patch-4Simon L2022-10-011-1/+1
|\ | | | | Makes untrusted domain error on info
| * Makes untrusted domain error on infoAndy Xheli2022-08-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Andy Xheli <axheli@axtsolutions.com> Since https://github.com/nextcloud/server/commit/e6d9ef2e38daffcab808eaa41b18ab16c6253b97 was applied logs get filled up with Trusted domain error. "X.X.X.X tried to access using "X.X.X.X" as host alot of users missed important errors do tohttps://github.com/nextcloud/server/commit/e6d9ef2e38daffcab808eaa41b18ab16c6253b97 please see https://github.com/nextcloud/server/issues/32599 This should fix. https://github.com/nextcloud/server/issues/32599#event-7281164903 Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
* | remove listeners to OC_Filesystem::(write|rename) old style hooksArthur Schiwon2022-09-261-10/+0
| | | | | | | | | | | | | | - the events are not emitted anymore - OC_Filesystem::isBlacklisted() is not called from anywhere else Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* | Refactor cache handlingJulius Härtl2022-08-311-0/+5
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Move setting of gc_maxlifetime to initSessionJulius Härtl2022-08-171-3/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add config option to disable strict session timeout to be able to use ↵Julius Härtl2022-08-171-1/+10
| | | | | | | | read_and_close Fixed https://github.com/nextcloud/server/issues/29356 Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Reopen sessions if we need to write to them instead of keeping them openJulius Härtl2022-08-171-0/+1
| | | | | | | Sessions are a locking operation until we write close them, so close them early and reopen later in case we want to write to them Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #33173 from ↵Christoph Wurst2022-08-101-0/+1
|\ | | | | | | | | nextcloud/enhancement/maintenance-mode-http-header Set special header for 503 maintenance mode
| * Set special header for 503 maintenance modeChristoph Wurst2022-08-081-0/+1
| | | | | | | | | | | | | | This removes ambiguity with a 503 returned by app code, web server or similar. Front-end and clients can then handle this state accordingly. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Do not redirect if requested CSS can not be foundChristoph Wurst2022-08-081-0/+9
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Fix 404 handling of requested JSON/XMLChristoph Wurst2022-07-081-0/+7
| | | | | | | | | If front-end or an application requests JSON/XML, there is no point in redirecting to the default page if that response doesn't exist. In the worst case that would just cause another request, therefore server load, traffic and a response that is meaningless to the requester. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #32435 from nextcloud/revert-32278-remove-default-phpJoas Schilling2022-06-031-1/+10
|\ | | | | Revert "Remove call to already default php.ini values"
| * Revert "Remove call to already default php.ini values"Joas Schilling2022-05-161-1/+10
| |
* | Merge pull request #32349 from nextcloud/enh/projects-eventCarl Schwan2022-05-271-1/+3
|\ \ | | | | | | Add event to load additional scripts for projects
| * | Introduce event for loading additional script on projectsJulius Härtl2022-05-121-1/+3
| |/ | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Merge pull request #32427 from nextcloud/boot-event-orderingRobin Appelman2022-05-171-5/+5
|\ \ | | | | | | reorder startup events to fix overlapping
| * | reorder startup events to fix overlappingRobin Appelman2022-05-161-5/+5
| |/ | | | | | | | | | | | | | | current the `request` and `runtime` events overlap with the `init` event which makes it hard to create usefull visualizations. this reorders things a bit to remove an overlap Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Merge pull request #32216 from SUNET/masterLouis2022-05-171-6/+13
|\ \ | | | | | | Respect user settings in php.ini if they are big enough
| * | Fix suggestions by @artonageMicke Nordin2022-05-161-3/+3
| | | | | | | | | | | | Signed-off-by: Micke Nordin <kano@sunet.se>
| * | Simpler version as proposed by @artonageMikael Nordin2022-04-301-14/+5
| | | | | | | | | | | | | | | Co-authored-by: Louis <6653109+artonge@users.noreply.github.com> Signed-off-by: Micke Nordin <kano@sunet.se>
| * | Respect user settings in php.ini if they are big enoughMicke Nordin2022-04-291-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the admin guide: * https://docs.nextcloud.com/server/latest/admin_manual/configuration_files/big_file_upload_configuration.html it is mentioned that you can tweek: * max_input_time * max_execution_time in order to enable larger file uploads. However, the current codebase will hard code these values to one hour, no matter what the user sets in php.ini. This patch will allow the user to set these settings in php.ini and they will be respected, if and only if, they are set to something bigger than 3600 seconds. Signed-off-by: Micke Nordin <kano@sunet.se>
* | | Properly import maintenance scriptJulius Härtl2022-05-161-2/+2
| |/ |/| | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* | Remove default valuesGit'Fellow2022-05-051-10/+1
|/ | | | These values are already the default on supported PHP versions. I suggest to remove these calls.
* Add a built-in profiler inside NextcloudCarl Schwan2022-04-041-0/+1
| | | | | | The webui is provided by a seperate application named profiler Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-idJoas Schilling2022-03-221-1/+5
|\ | | | | Extract request id handling to dedicated class so it can be injected without DB dependency
| * Extract request id handling to dedicated class so it can be injected manuallyJoas Schilling2022-02-231-1/+5
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | Merge pull request #31124 from nextcloud/enh/diagnostics-loggingJulius Härtl2022-03-021-0/+7
|\ \ | | | | | | Diagnostics event logging to log
| * | Add event logging to app loadingJulius Härtl2022-02-281-0/+7
| |/ | | | | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* / Build OC\Core\Application when running occ or cron to register listeners ↵Côme Chilliet2022-02-281-0/+2
|/ | | | | | correctly Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Makes untrusted domain error a warning.Pierre Ozoux2022-01-251-1/+1
| | | | | | | | | | | | It sends a 400 to the client, so I could even argue that it should be an error. But currently as an admin, I'm quiet surprised that I get a 400 in the UI, and nothing in the log with the default level. I saw this commit that explains the reason why info. But I disagree. Feel free to close the PR if you don't agree with it. Signed-off-by: Pierre Ozoux <pierre@ozoux.net>
* Use less deprecated methods in base.phpLouis Chemineau2022-01-191-4/+4
| | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* Load core before the update scriptJoas Schilling2022-01-181-1/+4
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Move bundles to /distJohn Molakvoæ (skjnldsv)2022-01-081-1/+1
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* l10n: Separate wordsValdnet2021-12-151-3/+3
| | | Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
* Fix basic auth for OAuth token endpointJoas Schilling2021-10-191-1/+7
| | | | | | | | Don't try to login when a client is trying to get a OAuth token. OAuth needs to support basic auth too, so the login is not valid inside Nextcloud and the Login exception would ruin it. Signed-off-by: Joas Schilling <coding@schilljs.com>
* Remove usage of \OC_Util::getDefaultPageUrl() and ↵Daniel Rudolf2021-08-041-4/+2
| | | | | | \OC_Util::redirectToDefaultPage() Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
* Migrate HintException to OCPGary Kim2021-06-301-1/+1
| | | | Signed-off-by: Gary Kim <gary@garykim.dev>
* accounts event handler to use eventdispatcher, DI and Accounts APIArthur Schiwon2021-06-301-2/+4
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>