| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* Also moved the autoloader setup a bit up since we need it in initpaths
|
|
|
|
| |
First step on getting the authorisation stuff cleaned up. This is only for the login form, all other stuff is still where it is.
|
|
|
|
| |
Signed-off-by: Stefan Weil <sw@weilnetz.de>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
defaults
Allows to inject something into the default content policy. This is for
example useful when you're injecting Javascript code into a view belonging
to another controller and cannot modify its Content-Security-Policy itself.
Note that the adjustment is only applied to applications that use AppFramework
controllers.
To use this from your `app.php` use `\OC::$server->getContentSecurityPolicyManager()->addDefaultPolicy($policy)`,
$policy has to be of type `\OCP\AppFramework\Http\ContentSecurityPolicy`.
To test this add something like the following into an `app.php` of any enabled app:
```
$manager = \OC::$server->getContentSecurityPolicyManager();
$policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
$policy->addAllowedFrameDomain('asdf');
$policy->addAllowedScriptDomain('yolo.com');
$policy->allowInlineScript(false);
$manager->addDefaultPolicy($policy);
$policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
$policy->addAllowedFontDomain('yolo.com');
$manager->addDefaultPolicy($policy);
$policy = new \OCP\AppFramework\Http\ContentSecurityPolicy(false);
$policy->addAllowedFrameDomain('banana.com');
$manager->addDefaultPolicy($policy);
```
If you now open the files app the policy should be:
```
Content-Security-Policy:default-src 'none';script-src yolo.com 'self' 'unsafe-eval';style-src 'self' 'unsafe-inline';img-src 'self' data: blob:;font-src yolo.com 'self';connect-src 'self';media-src 'self';frame-src asdf banana.com 'self'
```
|
| |
|
|
|
|
| |
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
|
|
|
|
| |
Otherwise this leads to an endless redirection in case of a CSRF exception. Also sets user expectation right.
|
| |
|
|
|
|
|
|
| |
When returning a 500 statuscode external applications may interpret this as an error instead of handling this more gracefully. This will now make return a 401 thus.
Fixes https://github.com/owncloud/core/issues/17742
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
testing ...
fixes
fix test
add php doc
fix small mistake
add another phpdoc
remove not working cors annotations from files app
|
| |
|
|
|
|
| |
This reverts commit 6a1a4880f0d556fb090f19a5019fec31916f5c36.
|
| |
|
|
|
|
| |
Because we're closing the session now before controllers are executed there are cases where we cannot write the session.
|
|
|
|
| |
Fixes https://github.com/owncloud/core/issues/12188 for AppFramework apps
|
|
|
|
| |
Otherwise the function is executed n times which is a lot of overhead
|
| |
|
|
|
|
| |
* fixes #6945
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
remove methodannotationreader namespace
fix namespace for server container
fix tests
fail if with cors credentials header is set to true, implement a reusable preflighted cors method in the controller baseclass, make corsmiddleware private and register it for every request
remove uneeded local in cors middleware registratio
dont uppercase cors to easily use it from routes
fix indention
comment fixes
explicitely set allow credentials header to false
dont depend on better controllers PR, fix that stuff later
split cors methods to be in a seperate controller for exposing apis
remove protected definitions from apicontroller since controller has it
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This patch was automatically generated as part of the following inspection:
https://scrutinizer-ci.com/g/owncloud/core/inspections/cdfecc4e-a37e-4233-8025-f0d7252a8720
Enabled analysis tools:
- PHP Analyzer
- JSHint
- PHP Copy/Paste Detector
- PHP PDepend
|
| |
|
|
|
|
|
| |
To avoid having to use OCP\Appframework\Http\Http in the public - and stable
- API OCP\Appframework\Http is now both a class and a namespace.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
It doesn't make sense for subclasses to have to implement
all methods.
|
|
Conflicts:
lib/private/vcategories.php
|