Côme Chilliet
444811b0fe
Use Server::get some more
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 09:10:40 +07:00
Côme Chilliet
cf508c1e47
Use strict typing in base.php
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-12-19 09:10:40 +07:00
Julius Härtl
be4c061b75
Set apcu prefix for composer
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-12-07 22:32:06 +07:00
Christoph Wurst
052dcdebe8
Refactor the ErrorHandler into a dynamic class
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-11-02 09:49:37 +07:00
Julius Härtl
11bedf1c3b
Use proper error pages instead of always redirecting
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-10-21 15:12:21 +07:00
Simon L
f97f13b136
Merge pull request #33737 from andyxheli/patch-4
...
Makes untrusted domain error on info
2022-10-01 18:06:44 +07:00
Arthur Schiwon
9b7ef2962e
remove listeners to OC_Filesystem::(write|rename) old style hooks
...
- the events are not emitted anymore
- OC_Filesystem::isBlacklisted() is not called from anywhere else
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2022-09-26 21:07:08 +07:00
Julius Härtl
80f6a5834a
Refactor cache handling
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-31 16:24:35 +07:00
Andy Xheli
12c8123873
Makes untrusted domain error on info
...
Signed-off-by: Andy Xheli <axheli@axtsolutions.com>
Since e6d9ef2e38 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 toe6d9ef2e38 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>
2022-08-29 13:27:12 +07:00
Julius Härtl
1b43fbe06c
Move setting of gc_maxlifetime to initSession
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-17 12:10:27 +07:00
Julius Härtl
9e1d431255
Add config option to disable strict session timeout to be able to use read_and_close
...
Fixed https://github.com/nextcloud/server/issues/29356
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-08-17 12:10:27 +07:00
Julius Härtl
9b4b72826a
Reopen sessions if we need to write to them instead of keeping them open
...
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>
2022-08-17 12:10:26 +07:00
Christoph Wurst
d17e0699f3
Merge pull request #33173 from nextcloud/enhancement/maintenance-mode-http-header
...
Set special header for 503 maintenance mode
2022-08-10 09:16:02 +07:00
Christoph Wurst
0ed987a8dd
Set special header for 503 maintenance mode
...
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>
2022-08-08 14:26:11 +07:00
Christoph Wurst
a1149b0378
Do not redirect if requested CSS can not be found
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-08-08 14:09:58 +07:00
Christoph Wurst
222a9523b5
Fix 404 handling of requested JSON/XML
...
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>
2022-07-08 19:14:05 +07:00
Joas Schilling
8e59d49701
Merge pull request #32435 from nextcloud/revert-32278-remove-default-php
...
Revert "Remove call to already default php.ini values"
2022-06-03 14:16:24 +07:00
Carl Schwan
e4378fd18c
Merge pull request #32349 from nextcloud/enh/projects-event
...
Add event to load additional scripts for projects
2022-05-27 18:36:40 +07:00
Robin Appelman
83f831c263
Merge pull request #32427 from nextcloud/boot-event-ordering
...
reorder startup events to fix overlapping
2022-05-17 11:55:00 +07:00
Louis
8ed92ad4f7
Merge pull request #32216 from SUNET/master
...
Respect user settings in php.ini if they are big enough
2022-05-17 10:14:56 +07:00
Joas Schilling
a6ca9d592d
Revert "Remove call to already default php.ini values"
2022-05-16 15:54:18 +07:00
Robin Appelman
a67bf03ac0
reorder startup events to fix overlapping
...
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>
2022-05-16 13:26:38 +07:00
Micke Nordin
0ace1831f4
Fix suggestions by @artonage
...
Signed-off-by: Micke Nordin <kano@sunet.se>
2022-05-16 10:15:45 +07:00
Julius Härtl
d3acf8203d
Properly import maintenance script
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-16 09:28:15 +07:00
Julius Härtl
9a6869943e
Introduce event for loading additional script on projects
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-05-12 10:50:13 +07:00
Git'Fellow
f110ff9f4d
Remove default values
...
These values are already the default on supported PHP versions.
I suggest to remove these calls.
2022-05-05 13:46:09 +07:00
Mikael Nordin
30fe91a77f
Simpler version as proposed by @artonage
...
Co-authored-by: Louis <6653109+artonge@users.noreply.github.com>
Signed-off-by: Micke Nordin <kano@sunet.se>
2022-04-30 16:41:35 +07:00
Micke Nordin
259664468a
Respect user settings in php.ini if they are big enough
...
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>
2022-04-29 14:50:57 +07:00
Carl Schwan
7d272c54d0
Add a built-in profiler inside Nextcloud
...
The webui is provided by a seperate application named profiler
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-04-04 10:28:26 +07:00
Joas Schilling
0acd4b5f82
Merge pull request #31235 from nextcloud/techdebt/noid/extract-request-id
...
Extract request id handling to dedicated class so it can be injected without DB dependency
2022-03-22 12:08:45 +07:00
Julius Härtl
2ff0c972c9
Merge pull request #31124 from nextcloud/enh/diagnostics-logging
...
Diagnostics event logging to log
2022-03-02 12:00:44 +07:00
Julius Härtl
eede608c0e
Add event logging to app loading
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2022-02-28 11:24:41 +07:00
Côme Chilliet
63d7e7c798
Build OC\Core\Application when running occ or cron to register listeners correctly
...
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2022-02-28 10:31:52 +07:00
Joas Schilling
07a9f34385
Extract request id handling to dedicated class so it can be injected manually
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-02-23 11:01:58 +07:00
Pierre Ozoux
e6d9ef2e38
Makes untrusted domain error a warning.
...
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>
2022-01-25 10:33:31 +07:00
Louis Chemineau
b46ff973e0
Use less deprecated methods in base.php
...
Signed-off-by: Louis Chemineau <louis@chmn.me>
2022-01-19 11:07:12 +07:00
Joas Schilling
c8bfd8a559
Load core before the update script
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2022-01-18 14:55:13 +07:00
John Molakvoæ (skjnldsv)
b664aad7ab
Move bundles to /dist
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2022-01-08 10:11:58 +07:00
Valdnet
03889d1297
l10n: Separate words
...
Signed-off-by: Valdnet <47037905+Valdnet@users.noreply.github.com>
2021-12-15 17:27:26 +07:00
Joas Schilling
03936d7762
Fix basic auth for OAuth token endpoint
...
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>
2021-10-19 13:03:23 +07:00
Daniel Rudolf
4d7430949a
Remove usage of \OC_Util::getDefaultPageUrl() and \OC_Util::redirectToDefaultPage()
...
Signed-off-by: Daniel Rudolf <github.com@daniel-rudolf.de>
2021-08-04 19:02:57 +07:00
Gary Kim
b78f3a57d1
Migrate HintException to OCP
...
Signed-off-by: Gary Kim <gary@garykim.dev>
2021-06-30 15:28:02 +07:00
Arthur Schiwon
638c04d6e0
accounts event handler to use eventdispatcher, DI and Accounts API
...
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2021-06-30 00:41:11 +07:00
Joas Schilling
cebfe4ba0e
Merge pull request #27190 from nextcloud/bugfix/noid/deduplicate-translation
...
Deduplicate translations and fix double .
2021-06-16 16:50:19 +07:00
John Molakvoæ (skjnldsv)
215aef3cbd
Update php licenses
...
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
2021-06-04 22:02:41 +07:00
Joas Schilling
b4b2947248
Deduplicate translations and fix double .
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-06-04 09:47:17 +07:00
Christoph Wurst
6a5d89c1ac
Merge pull request #26758 from J0WI/more-strict
...
Some more strict_types
2021-04-28 09:28:19 +07:00
Joas Schilling
167efa19d7
Fix psalm errors
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-04-27 14:34:32 +07:00
J0WI
a369933084
Fix ini_set() type
...
Signed-off-by: J0WI <J0WI@users.noreply.github.com>
2021-04-26 12:44:05 +07:00
Joas Schilling
f35d7adf7d
Don't hardcode the product name to Nextcloud but use the theming value
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-03-22 16:32:35 +07:00
Roeland Jago Douma
d4d33e3095
Merge pull request #25238 from nextcloud/enh/noid/apps-defacto-in-root
...
Apps folder is defacto in root folder and not above
2021-01-21 09:08:54 +07:00
Morris Jobke
d84e1f1951
Re-use fetched dependencies in lib/base.php
...
Reduces calls to DI container by reusing already fetched dependencies.
For status.php it went from 355 to 344.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-20 21:55:16 +07:00
Morris Jobke
5b0e69828f
Apps folder is defacto in root folder and not above
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2021-01-20 21:22:39 +07:00
Roeland Jago Douma
d13f2d984f
Merge pull request #25015 from nextcloud/fix/no-double-intl-polyfill
...
Replace patchwork/utf8 with symfony-polyfill-*
2021-01-08 08:25:31 +07:00
Christoph Wurst
287c26bda3
Replace patchwork/utf8 with symfony-polyfill-*
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2021-01-07 21:22:41 +07:00
Carlos Ferreira
bc1b5d7892
Remove useless ini_set functions
2021-01-07 15:24:49 +07: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 +07:00
Daniel Kesselberg
8ebd31d686
Make $vars and $secureRandom required.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-12-10 17:06:32 +07:00
Christoph Wurst
3cf39c573f
Allow lazy app registration
...
During app installation we run migration steps. Those steps may use
services the app registers or classes from composer. Hence we have to
make sure the app runs through the registration.
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-11-18 08:48:45 +07:00
Roeland Jago Douma
72a9c35be3
Remove some IRouter methods
...
This is not the end. IRouter needs to burn.
But it is a start.
🎵 we didn't start the fire 🎵
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-17 14:08:20 +07:00
John Molakvoæ
3bacb4780b
Removed config.js
2020-11-09 12:23:51 +07:00
Roeland Jago Douma
48d843858d
Do not setup the default FS on normal routes
...
This should help with load times hopefully. Only initialize the FS if we
actually ned it.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-11-06 09:03:32 +07:00
Joas Schilling
f2541e7a8b
Use auto-wiring on most outer level
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-20 17:43:50 +07:00
Joas Schilling
4bc821edd9
PSR logger for accounts
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-10-20 17:41:47 +07:00
Christoph Wurst
f464ef050b
Fix type errors detected by Psalm
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-14 15:40:12 +07:00
Christoph Wurst
d9015a8c94
Format code to a single space around binary operators
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-10-05 20:25:24 +07:00
Joas Schilling
b09620651c
Don't use deprecated getIniWrapper() anymore
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-08-20 16:35:38 +07:00
Morris Jobke
36ee37ec0a
Migrate OC_Group post_removeFromGroup hook to actual event object
...
Ref #14552
This adds a BeforeUserRemovedEvent to the LDAP backend because it was missing. It's not really before, but we don't have the before state.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-30 10:21:08 +07:00
Joas Schilling
5993bd45f3
Correctly remove usergroup shares on removing group members
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2020-07-30 09:47:31 +07:00
Morris Jobke
8d2d051841
Remove hook for initSession
...
It's not used anyways and allowed to manipulate the state of the session. Also removed the code handling this.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-07-07 21:44:36 +07:00
Christoph Wurst
c5d2958ac7
Migrate Settings to new bootstrap mechanism
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:22:22 +07:00
Christoph Wurst
69571fb536
Add dedicated API for apps' bootstrapping process
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-17 09:22:21 +07:00
Roeland Jago Douma
6aa6ab3e02
Add lazy events for the Node API
...
Right now if you want to get events via the Node API you have to have a
real instance of the Root. Which in turns sets up the whole FS.
We should make sure this is done lazy. Else enabling the preview
generator for example makes you setup the whole FS on each and every
authenticated call.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-05-28 12:35:45 +07:00
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +07: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 +07:00
Christoph Wurst
44577e4345
Remove trailing and in between spaces
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:07:47 +07:00
Christoph Wurst
42625a46be
Remove spaces after method or function call
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 16:05:56 +07:00
Arthur Schiwon
e52442e26f
fixes the throttler not checking the user state on postLogin
...
a listener to the post login events can still reject a login, so that a
user is not necessarily available at the time.
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
2020-04-03 22:51:46 +07:00
Roeland Jago Douma
19ca921676
Merge pull request #20241 from nextcloud/fix/license-headers-19
...
Update the license headers for Nextcloud 19
2020-04-01 12:44:21 +07: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 +07:00
John Molakvoæ
82b0cd2e7a
Update base.php
2020-03-28 16:19:01 +07:00
John Molakvoæ
7eac19682c
Update base.php
2020-03-28 16:17:50 +07: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 +07:00
Jose Quinteiro
6995e98df6
E_ALL already sets E_DEPRECATED
...
Signed-off-by: Jose Quinteiro <github@quinteiro.org>
2020-03-09 12:59:54 +07:00
Jose Quinteiro
6cf679e04e
Set error_logging correctly. Fixes #19847
...
Don't override the error_logging setting from php.ini unless we're
debugging.
Signed-off-by: Jose Quinteiro <github@quinteiro.org>
2020-03-09 12:05:21 +07:00
Daniel Kesselberg
56efd687ab
Check that username and password are present.
...
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
2020-02-23 18:53:17 +07:00
Julius Härtl
d05f131929
Move overwritehost check to isTrustedDomain
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2019-12-07 09:53:06 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Christoph Wurst
f6a79338d4
Make sure we create an app's Application class just once
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-10-11 08:21:24 +07:00
Christoph Wurst
de6940352a
Move settings to an app
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
2019-09-28 09:39:28 +07:00
Joas Schilling
e53d5b2dbe
Print plain error when the error page errors too
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-16 19:38:13 +07:00
Greta Doci
5898e87e0f
Remove deleted groups from app restrictions fixes #15823
...
Signed-off-by: Greta Doci <gretadoci@gmail.com>
2019-06-27 20:17:50 +07:00
Christoph Wurst
0cfcccee29
Migrate the maintenance script to a modern module and bundle
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-05-16 16:45:00 +07:00
Joas Schilling
de22bd618c
Fix placeholder in disable message
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-25 16:04:39 +07:00
Joas Schilling
752276fd89
Add a listener for the events
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-03-01 20:57:00 +07:00
Morris Jobke
ebbe8aad89
Remove not used appinfo/classpath.php check
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2019-02-28 14:32:32 +07:00
Joas Schilling
0c77cd21f9
Make sure maintenance mode is always casted to bool
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-02-22 08:25:41 +07:00
Joas Schilling
bb352fb667
Use the defined func()->count() instead of manual counting
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-11-08 15:44:45 +07:00
Joas Schilling
40d185e928
Revert "Use APCu caching of composer"
...
This reverts commit 948ab8a4d0 .
For details why see https://github.com/nextcloud/server/issues/11290
2018-09-19 15:47:01 +07:00
MartB
fe21b10de5
replace setcookie value with '' instead of null.
...
The php documentation states that an empty string should be used for a cookie when it has no real value.
null leads to the following error: expects parameter 2 to be string, null given
Signed-off-by: Martin Böh <mart.b@outlook.de>
2018-09-06 20:34:16 +07:00