summaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework
Commit message (Collapse)AuthorAgeFilesLines
* Use the short array syntax, everywhereChristoph Wurst2020-03-2615-208/+208
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use the shorter phpunit syntax for mocked return valuesChristoph Wurst2020-03-2512-118/+118
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Add test to trigger "Trying to access array offset on value of type int"Daniel Kesselberg2020-01-231-0/+62
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Make getServerHost more robust to faulty user inputDaniel Kesselberg2020-01-161-0/+46
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Modify regex to match some other chromium browsersDaniel Kesselberg2019-12-271-5/+26
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Mode to modern phpunitRoeland Jago Douma2019-11-2719-85/+85
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Make phpunit8 compatibleRoeland Jago Douma2019-11-2740-42/+42
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #17948 from nextcloud/enh/check-if-property-is-boolRoeland Jago Douma2019-11-261-8/+35
|\ | | | | Make isXXX available for bool properties only
| * Make isXXX available for bool properties onlyDaniel Kesselberg2019-11-161-8/+35
| | | | | | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* | Some php-cs fixesRoeland Jago Douma2019-11-2239-68/+32
|/ | | | | | | | | | | * Order the imports * No leading slash on imports * Empty line before namespace * One line per import * Empty after imports * Emmpty line at bottom of file Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move settings to an appChristoph Wurst2019-09-281-1/+1
| | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at> Signed-off-by: npmbuildbot[bot] <npmbuildbot[bot]@users.noreply.github.com>
* SessionMiddleware: declare session propertyRoeland Jago Douma2019-08-281-12/+4
| | | | | | | * Remove request since we don't useit * Update tests as well Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add testsRoeland Jago Douma2019-08-103-0/+355
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add feature policy headerRoeland Jago Douma2019-08-103-1/+4
| | | | | | | This adds the events and the classes to modify the feature policy. It also adds a default restricted feature policy. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update CSP test cases to handle the new form-actionRoeland Jago Douma2019-07-311-58/+58
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Split up security middlewareRoeland Jago Douma2019-07-272-97/+149
| | | | | | | | | | With upcoming work for the feature policy header. Splitting this in smaller classes that just do 1 thing makes sense. I rather have a few small classes that are tiny and do 1 thing right (and we all understand what is going on) than have big ones. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #15714 from nextcloud/fix/204_304_rfcRoeland Jago Douma2019-05-241-10/+9
|\ | | | | Check the actual status code for 204 and 304
| * Check the actual status code for 204 and 304Roeland Jago Douma2019-05-241-10/+9
| | | | | | | | | | | | | | | | | | | | The header is the full http header like: HTTP/1.1 304 Not Modified So comparing this to an int always yields false This also makes the 304 RFC compliant as the resulting content length should otherwise be the length of the message and not 0. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl> Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Make it possible to show admin settings for sub adminsChristoph Wurst2019-05-231-16/+47
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Set empty CSP by defaultRoeland Jago Douma2019-04-163-4/+4
| | | | | | | | | For #14179 By default responses should have the strictest (and simplest) CSP possible. Only template responses should require an actual CSP. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* [#11236] Set parameter type in QBMapperMarius David Wieschollek2019-03-241-0/+241
| | | | Signed-off-by: Marius David Wieschollek <git.public@mdns.eu>
* Add StandaloneTemplateResponseRoeland Jago Douma2019-02-061-0/+17
| | | | | | | This can be used by pages that do not have the full Nextcloud UI. So notifications etc do not load there. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* No need to emit additonalscript event on public pagesRoeland Jago Douma2019-02-051-0/+10
| | | | | | | There already is a separate event for this. This will make it possible to only inject code with the logged in one on default rendered pages. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Emit to load additionalscriptsRoeland Jago Douma2019-01-311-0/+108
| | | | | | | | | | | | | Fixes #13662 This will fire of an event after a Template Response has been returned. There is an event for the generic loading and one when logged in. So apps can chose to load only on loged in pages. This is a more generic approach than the files app event. As some things we might want to load on other pages as well besides the files app. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Allow resources via OCS as wellJoas Schilling2019-01-221-0/+85
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Set default frame-ancestors to 'self'Roeland Jago Douma2019-01-084-61/+61
| | | | | | For #13042 Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* CSP: Allow fonts to be provided in dataRoeland Jago Douma2019-01-074-62/+62
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Cleanup middleware registeringRoeland Jago Douma2019-01-031-9/+10
| | | | | | | | | Fixes #12224 Since we only use the middleware at 1 location it makes no sense to register them in each and every container. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Only trust the X-FORWARDED-HOST header for trusted proxiesRoeland Jago Douma2018-12-171-53/+90
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2018-11-022-17/+7
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Adding handling of CIDR notation to trusted_proxies for IPv4Oliver Wegner2018-10-301-0/+115
| | | | Signed-off-by: Oliver Wegner <void1976@gmail.com>
* Add report-uri to CSPRoeland Jago Douma2018-10-211-0/+15
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Disallow unsafe-eval by defaultRoeland Jago Douma2018-10-144-60/+67
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Do not use file as template parameterRoeland Jago Douma2018-08-091-1/+1
| | | | | | | | Using file will overwrite the $file parameter in the template base. Leading to trying to include a file that is the exception message. Which will of course fail. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix direct access to authen pageRoeland Jago Douma2018-06-201-0/+2
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add AuthPublicShareControllerTestRoeland Jago Douma2018-06-201-0/+157
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add PublicShareControllerTestsRoeland Jago Douma2018-06-201-0/+102
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add PublicShareMiddlewareTestRoeland Jago Douma2018-06-201-0/+287
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Move caching logic to responseRoeland Jago Douma2018-06-041-2/+12
| | | | | | | | | | This avoids having to do it at all the places we want cached responses. We can't inject the ITimeFactor without breaking public API. However we can perfectly overwrite the service (resulting in the same testable effect). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Merge pull request #8593 from eneiluj/masterMorris Jobke2018-03-081-10/+78
|\ | | | | Allow public page access to apps with group restrictions
| * Add testsRoeland Jago Douma2018-03-081-10/+78
| | | | | | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* | Remove testcaseRoeland Jago Douma2018-03-051-1/+0
|/ | | | | | | Since a token now always requires a string we don't need to test for null Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Add test for PublicTemplateResponseJulius Härtl2018-02-271-0/+84
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Merge pull request #8541 from nextcloud/translate-permission-error-pageMorris Jobke2018-02-261-7/+7
|\ | | | | Provide translated error message for permission error
| * Provide translated error message for permission errorMorris Jobke2018-02-261-7/+7
| | | | | | | | Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* | Fix proper typesRoeland Jago Douma2018-02-221-1/+1
|/ | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix testsRoeland Jago Douma2018-02-212-12/+18
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Update testsRoeland Jago Douma2018-01-291-8/+20
| | | | Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Fix risky tests without assertionsJoas Schilling2018-01-253-4/+7
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix "Undefined method setExpectedException()"Joas Schilling2018-01-246-24/+25
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>