aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/AppFramework
Commit message (Collapse)AuthorAgeFilesLines
* fix(phpunit): Remove some more withConsecutive callstechdebt/noid/prepare-phpunit10Joas Schilling2025-03-312-107/+75
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat(AppFramework): extend range check to optional parametersenh/noid/nullable-rangeArthur Schiwon2025-02-271-1/+11
| | | | | | | Now it also applies when a paramater is documtend with a pending |null, but no further unionation is considered. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix: Change UserAgent to *cloudfix/noid/thudnerbird-addon-useragentJohannes Endres2025-02-191-1/+1
| | | | | Co-authored-by: Daniel Kesselberg <mail@danielkesselberg.de> Signed-off-by: Johannes Endres <je@johannes-endres.de>
* fix(ratelimit): Allow to bypass rate-limit from bruteforce allowlistbugfix/noid/allow-ratelimit-bypassJoas Schilling2025-01-271-1/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Merge pull request #49515 from ↵Joas Schilling2024-11-281-3/+38
|\ | | | | | | | | nextcloud/bugfix/noid/boolean-false-in-multipart-form-data fix(controller): Fix false booleans in multipart/form-data
| * fix(controller): Fix false booleans in multipart/form-dataJoas Schilling2024-11-281-3/+38
| | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* | test:(PasswordConfirmationMiddleware): Fix constructor callLouis Chemineau2024-11-281-5/+14
|/ | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
* fix(entity): Fix mapping of old/sub-types to actually supported database typesfollowup/47329/add-all-types-to-handlingJoas Schilling2024-10-231-5/+39
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* fix: Prevent breaking change in IQueryBuilderFerdinand Thiessen2024-10-171-2/+2
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat(AppFramework): Add full support for date / time / datetime columnsFerdinand Thiessen2024-10-173-39/+231
| | | | | | | | | | | | | | | | This adds support for all Doctrine supported types, for the column types only the immutable variants needed to be added. But especially those types are the important ones, as our **Entity** class works by detecting changes through setters. Meaning if it is mutable, changes like `$entity->date->modfiy()` can not be detected, so the immutable types make more sense here. Similar the parameter types needed to be added. `Enity` and `QBMapper` needed to be adjusted so they support (auto map) those types, required when insert or update an entity. Also added more tests, especially to make sure the mapper really serializes the values correctly. Co-authored-by: Ferdinand Thiessen <opensource@fthiessen.de> Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore(deps): Update nextcloud/coding-standard to v1.3.1provokateurin2024-09-192-2/+2
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* Merge pull request #48008 from nextcloud/fix/entity/strict-typesKate2024-09-161-2/+7
|\
| * fix(Entity): Fix magic setter call for custom strong typed settersfix/entity/strict-typesprovokateurin2024-09-151-2/+7
| | | | | | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* | Merge pull request #48049 from nextcloud/refactor/void-testsAnna2024-09-1642-470/+470
|\ \ | | | | | | refactor: Add void return type to PHPUnit test methods
| * | refactor: Add void return type to PHPUnit test methodsChristoph Wurst2024-09-1542-470/+470
| |/ | | | | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* / refactor: Replace __CLASS__ with ::class referencesrefactor/self-class-referenceChristoph Wurst2024-09-151-2/+2
|/ | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* chore: Adapt tests to OC_API refactoringCôme Chilliet2024-09-092-1/+39
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* refactor(IMenuAction): Make public menu actions use the new Vue UIFerdinand Thiessen2024-09-031-2/+0
| | | | | | | | This removes custom rendering code an replaces it with the declarative menu actions. Also adjust the template to allow the Vue UI to mount. Custom entries still are possible. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* chore: Remove unused `CsrfTokenManager` from `CSPMiddleware`Ferdinand Thiessen2024-08-311-5/+0
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-2510-118/+118
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* perf: delay getting (sub)admin status for user in the security middleware ↵Robin Appelman2024-08-231-2/+15
| | | | | | untill we need it Signed-off-by: Robin Appelman <robin@icewind.nl>
* feat: Provide CSP nonce as `<meta>` elementFerdinand Thiessen2024-08-131-1/+0
| | | | | | | | This way we use the CSP nonce for dynamically loaded scripts. Important to notice: The CSP nonce must NOT be injected in `content` as this can lead to value exfiltration using e.g. side-channel attacts (CSS selectors). Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* test: Adjust tests for CSP nonceFerdinand Thiessen2024-08-133-252/+253
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix(files_sharing): show proper share not found error messageskjnldsv2024-08-061-2/+4
| | | | Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* fix(AppFramework): Allow requests with OCS-APIRequest header to pass CSRF checksprovokateurin2024-07-251-0/+20
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* feat(security): Add public API to allow validating IP Ranges and checking ↵Joas Schilling2024-07-191-2/+2
| | | | | | | for "in range" Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(security): restrict admin actions to IP rangesBenjamin Gaussorgues2024-07-191-1/+5
| | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* feat(Security): Warn about using annotations instead of attributesprovokateurin2024-07-182-12/+19
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* feat(AppFramework): Add ExAppRequired attributeprovokateurin2024-07-012-1/+58
| | | | Signed-off-by: provokateurin <kate@provokateurin.de>
* refactor(Token): introduce scope constantsArthur Schiwon2024-06-051-1/+1
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix(Session): avoid password confirmation on SSOArthur Schiwon2024-06-052-1/+63
| | | | | | | | | | | SSO backends like SAML and OIDC tried a trick to suppress password confirmations as they are not possible by design. At least for SAML it was not reliable when existing user backends where used as user repositories. Now we are setting a special scope with the token, and also make sure that the scope is taken over when tokens are regenerated. Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: Add SPDX headerAndy Scherzinger2024-05-1361-1016/+153
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* fix: Fix tests following OC_App migrations to IAppManagerCôme Chilliet2024-04-222-7/+15
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix: add check for app_api_system session flag to bypass rate limitFlorian Klinger2024-03-181-1/+5
| | | | | Signed-off-by: Florian Klinger <florian.klinger@nextcloud.com> Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com>
* fix xml ocs response for serializable objectsKlaus2024-02-231-0/+39
| | | | | Signed-off-by: sualko <klaus@jsxc.org> Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
* test(request): Add tests to strip the port when forwarding requestsJoas Schilling2024-02-131-288/+119
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Add timezone getter to ITimeFactoryAnna Larch2024-02-131-0/+17
| | | | Signed-off-by: Anna Larch <anna@nextcloud.com>
* better testsMaxence Lange2024-02-011-129/+606
| | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* fix lintMaxence Lange2024-01-311-18/+18
| | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* adding testMaxence Lange2024-01-311-0/+214
| | | | Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
* test(unit): fix RequestTestArthur Schiwon2024-01-271-3/+4
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* fix(API): Use a distinct exception so apps can react to it and customize the ↵Joas Schilling2023-11-281-1/+2
| | | | | | return Signed-off-by: Joas Schilling <coding@schilljs.com>
* enh(dispatcher): enforce psalm ranges in the http dispatcherArthur Schiwon2023-11-242-0/+68
| | | | | | - allows devs to provide int ranges for API arguments Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-234-11/+11
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* fix(CSP): Only add `strict-dynamic` when using noncesFerdinand Thiessen2023-11-172-59/+59
| | | | Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* fix!(ContentSecurityPolicy): Make `strict-dynamic` enabled by default on ↵Ferdinand Thiessen2023-11-171-76/+73
| | | | | | `script-src-elem` Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* feat(ContentSecurityPolicy): Allow to set `strict-dynamic` on ↵Ferdinand Thiessen2023-11-172-0/+73
| | | | | | | | | `script-src-elem` only This adds the possibility to set `strict-dynamic` on `script-src-elem` only while keep the default rules for `script-src`. The idea is to allow loading module js which imports other files and thus does not allow nonces on import but on the initial script tag. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
* Reverse X-Forwarded-For list to read the correct proxy remote addressJoas Schilling2023-11-161-6/+32
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* feat(dependencyinjection): Allow optional (nullable) servicesChristoph Wurst2023-11-031-0/+24
| | | | | | Allows working with classes that might or might not be available. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Merge pull request #39852 from nextcloud/pragmaHeaderFerdinand Thiessen2023-10-181-2/+0
|\ | | | | Stop sending deprecated Pragma header