summaryrefslogtreecommitdiffstats
path: root/lib/private/appframework/http
Commit message (Collapse)AuthorAgeFilesLines
* Move \OC\AppFramework to PSR-4Roeland Jago Douma2016-04-223-1042/+0
| | | | * Also moved the autoloader setup a bit up since we need it in initpaths
* Move logout to controllerLukas Reschke2016-04-181-1/+1
| | | | Testable code. Yay.
* lib: Fix typos (found by codespell)Stefan Weil2016-04-071-1/+1
| | | | Signed-off-by: Stefan Weil <sw@weilnetz.de>
* Add magical regex to catch browsersLukas Reschke2016-03-241-0/+8
|
* Check if request is sent from official ownCloud clientLukas Reschke2016-03-241-0/+3
| | | | | | There are authentication backends such as Shibboleth that do send no Basic Auth credentials for DAV requests. This means that the ownCloud DAV backend would consider these requests coming from an untrusted source and require higher levels of security checks. (e.g. a CSRF check) While an elegant solution would rely on authenticating via token (so that one can properly ensure that the request came indeed from a trusted client) this is a okay'ish workaround for this problem until we have something more reliable in the authentication code.
* Fix warning in request.phpRoeland Jago Douma2016-03-231-1/+8
| | | | | | | * Added proper @property tags * RunTimeException => RuntimeException Makes code analyzers happier
* Add new CSRF manager for unit testing purposesLukas Reschke2016-01-251-19/+11
| | | | This adds a new CSRF manager for unit testing purposes, it's interface is based upon https://github.com/symfony/security-csrf. Due to some of our required custom changes it is however not possible to use the Symfony component directly.
* Happy new year!Thomas Müller2016-01-123-4/+7
|
* getLowStrengthGenerator does not do anything anymoreRoeland Jago Douma2016-01-111-1/+1
|
* Use PHP polyfillsLukas Reschke2015-12-111-1/+1
|
* Also allow empty value for no-HTTPS.Mitar2015-11-271-1/+2
| | | | This makes it work better with old version of Nginx.
* also match ie11 with Request::USER_AGENT_IERobin Appelman2015-11-221-1/+1
|
* Fix undefined HTTP_USER_AGENTThomas Müller2015-11-221-0/+3
|
* Update license headersLukas Reschke2015-10-261-0/+1
|
* Remove dependency on ICrypto + use XORLukas Reschke2015-10-211-11/+4
|
* fix IE8 user agent detectionMorris Jobke2015-10-091-0/+1
|
* Merge pull request #19034 from owncloud/http-request-warningThomas Müller2015-10-081-1/+3
|\ | | | | Prevent warning decoding content
| * Prevent warning decoding contentRobin McCorkell2015-09-141-1/+3
| |
* | Merge pull request #19607 from owncloud/use-urlThomas Müller2015-10-081-3/+13
|\ \ | | | | | | Use `/` if installed in main folder
| * | Use `/` if installed in main folderLukas Reschke2015-10-061-3/+13
| | | | | | | | | | | | | | | | | | Otherwise an empty string is used indicating the cookie is only valid for those resources. This can lead to eunexpected behaviour. Fixes https://github.com/owncloud/core/issues/19196
* | | Add \OCP\IRequest::getHttpProtocolLukas Reschke2015-10-061-0/+21
|/ / | | | | | | | | | | Only allow valid HTTP protocols. Ref https://github.com/owncloud/core/pull/19537#discussion_r41252333 + https://github.com/owncloud/security-tracker/issues/119
* | deduplicate @xenopathicMorris Jobke2015-10-061-1/+0
| |
* | update licence headers via scriptMorris Jobke2015-10-051-1/+2
| |
* | return '' instead of falseJörn Friedrich Dreyer2015-09-231-1/+1
|/
* Decode request content only on getContentRobin McCorkell2015-08-311-34/+49
|
* Add mitigation against BREACHLukas Reschke2015-08-141-1/+21
| | | | | | | | | | | | While BREACH requires the following three factors to be effectively exploitable we should add another mitigation: 1. Application must support HTTP compression 2. Response most reflect user-controlled input 3. Response should contain sensitive data Especially part 2 is with ownCloud not really given since user-input is usually only echoed if a CSRF token has been passed. To reduce the risk even further it is however sensible to encrypt the CSRF token with a shared secret. Since this will change on every request an attack such as BREACH is not feasible anymore against the CSRF token at least.
* Set default `forwarded_for_headers` to 'HTTP_X_FORWARDED_FOR'Robin McCorkell2015-08-101-1/+4
|
* Remove "use" statementLukas Reschke2015-08-051-2/+1
| | | | Ref https://bugs.php.net/bug.php?id=66773
* Use StringUtils::equals on CSRF token and add unit testsLukas Reschke2015-08-041-5/+4
|
* Fixing 'Undefined index: REMOTE_ADDR' - fixes #17460Thomas Müller2015-07-161-1/+2
|
* Merge pull request #17078 from owncloud/fix-initial-server-hostMorris Jobke2015-07-011-6/+5
|\ | | | | Fix undefined offset
| * Fix undefined offsetLukas Reschke2015-06-221-6/+5
| | | | | | | | There are cases where no trusted host is specified such as when installing the instance, this lead to an undefined offset warning in the log right after installing. (when another domain than localhost or 127.0.0.1 was used)
* | update license headers and authorsMorris Jobke2015-06-251-0/+1
|/
* Merge pull request #15735 from owncloud/fix-visibilityMorris Jobke2015-04-201-1/+1
|\ | | | | Fix visibility of interfaces in \OCP
| * Fix visibility of public API methodsJoas Schilling2015-04-201-1/+1
| |
* | Remove unused variablesMorris Jobke2015-04-181-2/+1
|/ | | | | * should make scrutinizer a lot more happy * reduces maybe memory footprint
* Update license headersJenkins for ownCloud2015-03-263-32/+50
|
* Let users configure security headers in their WebserverLukas Reschke2015-03-021-1/+1
| | | | | | | | | | Doing this in the PHP code is not the right approach for multiple reasons: 1. A bug in the PHP code prevents them from being added to the response. 2. They are only added when something is served via PHP and not in other cases (that makes for example the newest IE UXSS which is not yet patched by Microsoft exploitable on ownCloud) 3. Some headers such as the Strict-Transport-Security might require custom modifications by administrators. This was not possible before and lead to buggy situations. This pull request moves those headers out of the PHP code and adds a security check to the admin settings performed via JS.
* AppFramework StreamResponseBernhard Posselt2015-02-272-6/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | First stab at the StreamResponse, see #12988 The idea is to use an interface ICallbackResponse (I'm not 100% happy with the name yet, suggestions?) that allow the response to output things in its own way, for instance stream the file using readfile Unittests are atm lacking, plan is to check if a mock of ICallbackResponse will be used by calling its callback (also unhappy with this name) method Usage is: $response = new StreamResponse('path/to/file'); rename io to output, add additional methods and handle error and not modified cases when using StreamResponse fix indention and uppercasing, also handle forbidden cases fix indention fix indention no forbidden, figuring out if a file is really readable is too complicated to get to work across OSes and streams remove useless import remove useless import fix intendation
* Revert "Updating license headers"Morris Jobke2015-02-262-31/+30
| | | | This reverts commit 6a1a4880f0d556fb090f19a5019fec31916f5c36.
* Merge pull request #14458 from owncloud/revive/11157Thomas Müller2015-02-251-3/+9
|\ | | | | Get the real protocol behind several proxies
| * Use [0] instead of current as HHVM might have problems with thatLukas Reschke2015-02-241-1/+1
| |
| * Get the real protocol behind several proxiesLukas Reschke2015-02-241-3/+9
| | | | | | | | | | | | X-Forwarded-Proto contains a list of protocols if ownCloud is behind multiple reverse proxies. This is a revival of https://github.com/owncloud/core/pull/11157 using the new IRequest public API.
* | Merge pull request #14151 from owncloud/update-sabre2.1Thomas Müller2015-02-251-2/+2
|\ \ | |/ |/| Sabre Update to 2.1
| * Sabre Update to 2.1Vincent Petry2015-02-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - VObject fixes for Sabre\VObject 3.3 - Remove VObject property workarounds - Added prefetching for tags in sabre tags plugin - Moved oc_properties logic to separate PropertyStorage backend (WIP) - Fixed Sabre connector namespaces - Improved files plugin to handle props on-demand - Moved allowed props from server class to files plugin - Fixed tags caching for files that are known to have no tags (less queries) - Added/fixed unit tests for Sabre FilesPlugin, TagsPlugin - Replace OC\Connector\Sabre\Request with direct call to httpRequest->setUrl() - Fix exception detection in DAV client when using Sabre\DAV\Client - Added setETag() on Node instead of using the static FileSystem - Also preload tags/props when depth is infinity
* | properly initialize OC::$WEBROOT and host nameThomas Müller2015-02-231-1/+1
|/
* Updating license headersJenkins for ownCloud2015-02-232-30/+31
|
* Incorporate review changesLukas Reschke2015-02-161-6/+6
|
* Add blackmagic due to cyclic dependency :see_no_evil:Lukas Reschke2015-02-161-3/+3
|
* Make scrutinizer happyLukas Reschke2015-02-161-1/+1
|