Commit Graph

139 Commits (master)

Author SHA1 Message Date
Josh de39c5122c
chore: drop unused ocs/providers.php
This appears to have been originally intended to support the providers list functionality mentioned in the OCS <=v1.7 spec. That is, appears to be an implementation of what was suggested be made available at `https://domain.tld/ocs/providers.xml`.

However best as I can tell it never worked. It also doesn't appear in the v2.0 spec drafts.


Signed-off-by: Josh <josh.t.richards@gmail.com>
2025-08-11 18:20:19 +07:00
Côme Chilliet 7127ac4b43
fix: Replace OC_App::loadApp calls by IAppManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-10 11:40:27 +07:00
Andy Scherzinger 0c087ece4c
Merge pull request #53740 from nextcloud/fix/properly-fail-on-invalid-json
Properly fail on invalid json
2025-07-03 18:00:28 +07:00
Ferdinand Thiessen 5981b7eb51
chore: apply new CSFixer rules
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>

# Conflicts:
#	apps/settings/lib/SetupChecks/PhpOpcacheSetup.php
2025-07-01 16:26:50 +07:00
Côme Chilliet e8bc35ec0a
fix(ocs): Return a proper error on JSON decoding failures
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2025-07-01 10:45:31 +07:00
provokateurin 3b42c92d69
refactor: Extend rector to ocs/ and ocs-provider/
Signed-off-by: provokateurin <kate@provokateurin.de>
2025-05-15 10:30:03 +07:00
provokateurin 9836e9b164
chore(deps): Update nextcloud/coding-standard to v1.3.1
Signed-off-by: provokateurin <kate@provokateurin.de>
2024-09-19 14:21:20 +07:00
Côme Chilliet 42c5a60c29 fix: Force 503 HTTP status code for maintenance mode on v1
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-09 10:46:29 +07:00
Côme Chilliet e184784f86 fix: Remove duplicated code in \OC\OCS\ApiHelper, use Response classes instead
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-09 10:46:29 +07:00
Côme Chilliet 4c9104ef08 fix: Move ApiHelper to \OC\OCS next to related classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-09 10:46:29 +07:00
Côme Chilliet ea32d17d88 fix: Move OC_API into \OC\ApiHelper in standard namespace
It’s only used by ocs/v1.php

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-09-09 10:46:29 +07:00
Andy Scherzinger 1f7e2ba599
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-13 17:41:36 +07:00
Côme Chilliet c0ce272e9c chore: Migrate away from OC::$server->getLogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2024-02-13 17:32:30 +07: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 +07:00
Joas Schilling aa5f037af7
chore: apply changes from Nextcloud coding standards 1.1.1
Signed-off-by: Joas Schilling <coding@schilljs.com>
Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
2023-11-23 10:36:13 +07:00
Maxence Lange fc29b0d1b7 app type extended_authentication
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
2023-04-12 09:34:49 +07:00
Christoph Wurst a5ea17a2e5 Fix missing maintenance mode header for OCS request
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2022-09-30 10:52:40 +07:00
Carl Schwan 6312c0df69
Check style update
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-01-13 00:19:07 +07:00
Joas Schilling c160668b07
Return 500 and the exception message (on debug) on OCS
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-10-22 11:26:18 +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
Roeland Jago Douma cc744740b7 Remove deprecated \OCP\API
Time to remove this forgood now.
Remaining constant moved over
The world is a tiny bit better

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2021-03-03 20:54:32 +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
Vincent Petry 5f405e1454
Fix loading order for OCS endpoints
The loading order can have side effects in the way how apps register
plugins, listeners, etc.

Recently the order had been changed as part of cleaning up old code, but
caused apps to break.

This brings back the old app loading order to guarantee that apps won't
break, even though it might not semantically make sense.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
2020-12-10 08:20:20 +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
Roeland Jago Douma 3831d8f57f
Remove the matching on ancient /ocs routes
The appframework has been the default for quite some time now. So time
to take proper advantage of it.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2020-10-31 12:12:03 +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
Christoph Wurst 94a95ffceb
Fix invalid usage of \Exception::getResult
Only OCS exceptions have a getResult method. Any other exception will
cause another error due to this invalid method call.

This splits the catch into a specific one for OCS and then a generic one
for anything else that can't be handled.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-06-16 15:37:20 +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 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +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
Julius Härtl 3e21033dfc
Fix undefined constant error for STATUS_SERVICE_UNAVAILABLE
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-07-26 22:56:17 +07: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 +07:00
Roeland Jago Douma e628424ccf
Warn about the old OCP\API::register construct for OCS
* Add sleep
* Add log message

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-01-17 15:18:22 +07:00
Morris Jobke ca74a54dfa
Remove "DEBUG OUTPUT:" from failing OCS API requests
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2018-01-09 18:34:25 +07: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 +07:00
Morris Jobke 0eebff152a
Update license headers
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Roeland Jago Douma 87e10f9e6a
OC_OCS_Response is deprecated
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-09-21 17:56:00 +07:00
Lukas Reschke 80b649c471
Suppress deprecated function in \OCP\JSON
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2017-08-01 08:20:15 +07:00
Roeland Jago Douma 7753b93aa6
PrivateData to app
* PrivateData is an app now: https://github.com/nextcloud/privatedata
* No need to load the OCS routes.php (as there is none!)

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2017-07-21 08:51:14 +07:00
Joas Schilling 9f3d9b5b23
Don't force the use of Accept-Language anymore
This is not intended anymore, since it falls back to force english
when the header is not set. Also 0228bc6e66
makes clear that the order should be:

1. User setting
2. Accept language
3. Admin default

This is the case since the commit from above, unless via OCS and DAV.
Both forced to accept-language falling back to english.
By removing the force, it now also matches the w3 priority list:
https://www.w3.org/International/questions/qa-lang-priorities

Signed-off-by: Joas Schilling <coding@schilljs.com>
2017-04-07 11:10:04 +07:00
Morris Jobke 6174a514b7
Get rid of static OCS::notFound()
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-03-03 00:41:21 +07: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 +07:00
Robin Appelman e7e614d801
log ocs exceptions
Signed-off-by: Robin Appelman <robin@icewind.nl>
2017-02-08 15:17:03 +07:00
Vincent Petry 00f135d320
Die in OCS v1.php on exception
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
2016-12-16 17:35:42 +07:00
Roeland Jago Douma 1baa2b8deb
Move OC\OCS\Person to OCSController
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-11-16 19:21:00 +07: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 +07:00
Roeland Jago Douma 2812755359
Move federated sharing routes to the federatedfilesharingapp
* Move routes to app
* Move routes over to the AppFramework
* Fix tests

There is plenty of stuff to fix properly here. But out of scope for now.
2016-08-28 21:26:33 +07:00
Roeland Jago Douma 6bc1c6590c
Move /config over to Core OCSController 2016-08-18 09:37:09 +07:00
Roeland Jago Douma 69da896785
Move /cloud/user to Core app 2016-08-09 20:56:31 +07:00
Roeland Jago Douma 02449c8336
Move getCapabilities over to Core 2016-08-09 20:56:31 +07:00