Commit Graph

86 Commits (master)

Author SHA1 Message Date
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>
5 months ago
Maxence Lange fc29b0d1b7 app type extended_authentication
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
1 year ago
Robin Appelman 4dbcfa387a
return proper error code when reporting exception fails in remote.php
Signed-off-by: Robin Appelman <robin@icewind.nl>
2 years ago
Côme Chilliet 771028dada
Add missing use for LoggerInterface
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
2 years ago
John Molakvoæ (skjnldsv) 215aef3cbd
Update php licenses
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
3 years ago
Christoph Wurst d89a75be0b
Update all license headers for Nextcloud 21
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
3 years ago
Christoph Wurst d9015a8c94
Format code to a single space around binary operators
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
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>
4 years ago
Christoph Wurst 44577e4345
Remove trailing and in between spaces
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 1a9330cd69
Update the license headers for Nextcloud 19
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Georg Ehrke 52ba75f644
Sabre/DAV 4.0: beforeMethod is now beforeMethod:*
Signed-off-by: Georg Ehrke <developer@georgehrke.com>
4 years ago
Christoph Wurst b80ebc9674
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Christoph Wurst 5bf3d1bb38
Update license headers
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
4 years ago
Morris Jobke b0a296e2e1
Do not use HTTP code OC_Response constants anymore
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
Morris Jobke 1399f6bece
Server exception error pages by default with a 500 status code
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
6 years ago
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>
6 years ago
Roeland Jago Douma f984664bee
First step of DAV endpoint
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
6 years ago
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>
6 years ago
Lukas Reschke 80b649c471
Suppress deprecated function in \OCP\JSON
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
7 years ago
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>
7 years ago
Joas Schilling f3319f6294
Allow to call the files even when you are in another instance atm
Signed-off-by: Joas Schilling <coding@schilljs.com>
8 years ago
Joas Schilling 0215b004da
Update with robin 8 years ago
Joas Schilling ba87db3fcc
Fix others 8 years ago
Lukas Reschke aba539703c
Update license headers 8 years ago
Thomas Müller 211e518e16 Fix undefined variable $ex 8 years ago
Thomas Müller 6a6fc742dc Catch class Error on all root entrypoints 8 years ago
Lukas Reschke 0cba1ba7f9
Employ a stricter Content Security Policy on remote.php
Items sent by remote.php have not to be interpreted by browsers in any way.
8 years ago
Thomas Müller 7bdde98617 All webdav endpoints within remote.php are now hardcoded - helps to prevent migration issues like #23610 - furthermore there is no need to dynamically lookup all the endpoints we already know 8 years ago
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
8 years ago
Joas Schilling 043625ee52 Move findLanguage() and setLanguageFromRequest() to factory 8 years ago
Thomas Müller 682821c71e Happy new year! 8 years ago
Thomas Müller f2889dc6e4 Consolidate webdav code - move all to one app 9 years ago
Morris Jobke 8366ce2767 deduplicate @xenopathic 9 years ago
Morris Jobke b945d71384 update licence headers via script 9 years ago
Robin McCorkell b4532028f9 Avoid logging normal exceptions in remote.php
When the instance needs an upgrade, or a file is not found, no logging
will occur to avoid filling up log files
9 years ago
Thomas Müller 039a470a6a Fixing content type detection and handle all local printErrorPage calls 9 years ago
Thomas Müller 5dc7eebcdb Adding request specific exception handling - now with WebDAV responses - refs #17192 9 years ago
Morris Jobke f63915d0c8 update license headers and authors 9 years ago
Jenkins for ownCloud b585d87d9d Update license headers 9 years ago
Thomas Müller 2367797c17 Respect http header 'Accept-Language' on ocs and remote.php calls 9 years ago
Morris Jobke 06aef4e8b1 Revert "Updating license headers"
This reverts commit 6a1a4880f0.
9 years ago
Jenkins for ownCloud 6a1a4880f0 Updating license headers 9 years ago
Lukas Reschke 886bda5f81 Refactor OC_Request into TrustedDomainHelper and IRequest
This changeset removes the static class `OC_Request` and moves the functions either into `IRequest` which is accessible via `\OC::$server::->getRequest()` or into a separated `TrustedDomainHelper` class for some helper methods which should not be publicly exposed.

This changes only internal methods and nothing on the public API. Some public functions in `util.php` have been deprecated though in favour of the new non-static functions.

Unfortunately some part of this code uses things like `__DIR__` and thus is not completely unit-testable. Where tests where possible they ahve been added though.

Fixes https://github.com/owncloud/core/issues/13976 which was requested in https://github.com/owncloud/core/pull/13973#issuecomment-73492969
9 years ago
Robin Appelman 7cb12d4bff Add sabredav plugin to check if a user has access to an app 10 years ago
Robin Appelman a05147e25c handle service not available exceptions in index, remote and public.php 10 years ago
Vincent Petry 4e43e3626e Prevent loading apps in remote when an upgrade is due 10 years ago
Lukas Reschke 7c4abce373 Move authentication to it's own call 10 years ago
Lukas Reschke ac7fb1b23e Remove legacy routing code
The getfile routing code was absolutely legacy and not needed anymore. Additionally \OC::$REQUESTEDAPP was never set to the actually accessed application.

This commit removes the legacy routing code and ensures that $REQUESTEDAPP is always set so that other applications (e.g. the firewall or a two-factor authentication) can intercept the currently accessed app.

Testplan:
[x] Installation works
[x] Login with DB works
[x] Logout works
[x] Login with alternate backend works (tested with user_webdavauth)
[x] Other apps are accessible
[x] Redirect on login works (e.g. index.php?redirect_url=%2Fcore%2Findex.php%2Fsettings%2Fapps%3Finstalled)
[x] Personal settings are accessible
[x] Admin settings are accessible
[x] Sharing files works
[x] DAV works
[x] OC::$REQUESTEDAPP contains the requested application and can be intercepted by other applications
10 years ago
Thomas Müller 6ff96b34ad Merge branch 'master' into load-apps-proper-master
Conflicts:
	apps/files/ajax/rawlist.php
	cron.php
	ocs/v1.php
10 years ago
Robin Appelman d329049e53 Remove no longer needed if statement 10 years ago