aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workflowengine/lib/Check
Commit message (Collapse)AuthorAgeFilesLines
* fix(workflows): Fix file systemtag cacheJoas Schilling2024-07-101-21/+9
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* chore: Add SPDX headerAndy Scherzinger2024-05-3111-236/+22
| | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
* chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-231-1/+1
| | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
* Merge pull request #38604 from ↵Côme Chilliet2023-08-072-6/+6
|\ | | | | | | | | fsamapoor/replace_strpos_calls_in_workflowengine_app Refactors "strpos" calls in /apps/workflowengine
| * Fixes "PossiblyFalseArgument" notices.Faraz Samapoor2023-07-032-6/+6
| | | | | | | | | | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com> Signed-off-by: Faraz Samapoor <fsa@adlas.at>
| * Refactors "strpos" calls in /apps/workflowengine to improve code readability.Faraz Samapoor2023-07-032-6/+6
| | | | | | | | | | Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com> Signed-off-by: Faraz Samapoor <fsa@adlas.at>
* | fix: Avoid failing with duplicate checksJulius Härtl2023-07-121-7/+1
|/ | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* fix(workflow): Check tag attributeJoas Schilling2023-03-161-8/+29
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* remove file exists check from `cacheAndReturnMimeType`Robin Appelman2022-12-201-2/+2
| | | | | | | | the method is only called if the file exists already a check against storing the fallback mimetype is added as a safety instead Signed-off-by: Robin Appelman <robin@icewind.nl>
* use mimetype from cache for workflow if availableRobin Appelman2022-12-201-4/+8
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Make sure to not pass null to DateTime::createFromFormatCôme Chilliet2022-11-141-2/+2
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Fix psalm issuesCarl Schwan2022-01-131-1/+4
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Add helper method in WrapperCarl Schwan2022-01-131-12/+5
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* The storage is not static anymoreCarl Schwan2022-01-131-15/+11
| | | | | | Don't call twice $cache->getId Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Optimize FileSystemTags workflow for groupfolderCarl Schwan2022-01-131-9/+29
| | | | | | | | | | | | | | | | | | | | | In https://github.com/nextcloud/server/pull/28774 we disabled the caching for the groupfolder application since it worked due to the fact that in groupfolders, getFileIds could be called with the same $cacheId and path for actually different groupfolders. This revert this change and instead add the folderId from the groupFolder to the cacheId. This solve the issue of the uniqueness of the cacheId inside GroupFolder. Downside is that we introduce groupfolder specific implementation inside the server repo. The seconf optimization is to not consider paths starting with __groupfolders in executeCheck. This is due to the fact that files in the groupfolder application call two times executeCheck one time with the url __groupfolder/<folderId>/<path> and the other time with <path>. The first time will always return an empty systemTags array while the second call will return the correct system tags. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix RequestURL check for cli commandsCarl Schwan2022-01-111-6/+11
| | | | | | | | Fix https://github.com/nextcloud/files_automatedtagging/issues/526 Fix https://github.com/nextcloud/groupfolders/issues/1855 Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* fix testsRobin Appelman2021-12-021-2/+2
| | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* Detect mimetype by content only with contentJoas Schilling2021-10-271-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Do not cache file ids in FileSystemTags inside group foldersRichard Steinmetz2021-09-141-2/+10
| | | | Signed-off-by: Richard Steinmetz <richard@steinmetz.cloud>
* Update php licensesJohn Molakvoæ (skjnldsv)2021-06-0411-33/+70
| | | | Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
* Rename External storages to External storageszaimen2021-05-201-1/+1
| | | | Signed-off-by: szaimen <szaimen@e.mail.de>
* Bump nextcloud/coding-standard from 0.3.0 to 0.5.0dependabot-preview[bot]2021-02-181-2/+2
| | | | | | | | | | Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 0.3.0 to 0.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v0.3.0...v0.5.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unneeded casts that were found by PsalmMorris Jobke2021-01-111-1/+1
| | | | | | In preparation of the update of Psalm from 4.2.1 to 4.3.1+ (see https://github.com/nextcloud/server/pull/24521) Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* consider local external storages, tooArthur Schiwon2020-12-151-1/+2
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* enables the file name check also to match name of mountpointsArthur Schiwon2020-12-151-2/+20
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Only execute plain mimetype check for directories and do the fallback only ↵Morris Jobke2020-11-301-2/+6
| | | | | | | | for non-directories Ref #23096 Signed-off-by: Morris Jobke <hey@morrisjobke.de>
* Make sure to check the mimetype on the path if a secure one could not be ↵Julius Härtl2020-09-291-0/+13
| | | | | | detemined though the content Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Update urls to stackoverflow.com to "HTTPS"J0WI2020-09-171-3/+3
| | | | Signed-off-by: J0WI <J0WI@users.noreply.github.com>
* Flow: Include root folder for shared storages when fetching system tagsJulius Härtl2020-06-151-1/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* Add visibility to all constantsChristoph Wurst2020-04-101-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Format control structures, classes, methods and functionChristoph Wurst2020-04-103-3/+0
| | | | | | | | | | | | | | | 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>
* Use elseif instead of else ifChristoph Wurst2020-04-103-4/+4
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Unify function spacing to PSR2 recommendationChristoph Wurst2020-04-092-2/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use a blank line after the opening tagChristoph Wurst2020-04-092-0/+2
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Use exactly one empty line after the namespace declarationChristoph Wurst2020-04-099-9/+0
| | | | | | For PSR2 Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* Remove unused importsChristoph Wurst2020-03-251-1/+0
| | | | Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* make the mime type checker for flow available to regular usersArthur Schiwon2020-01-091-0/+4
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Allow to specify apps that somethign is a dirJoas Schilling2019-12-102-4/+15
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Improve mimetype detection in workflow componentsJoas Schilling2019-12-101-82/+13
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Only cache the mimetype if the file existsJoas Schilling2019-10-141-15/+35
| | | | | | | | | | | | | Otherwise files access control will cache "application/octet-stream" for all the target node on: rename, move, copy and all other methods which create a new item To check this: 1. Add an automated tagging rule which tags on mimetype NOT "httpd/unix-directory" 2. Add an access control rule which checks for any mimetype 3. Create a folder and rename it, the folder should not be tagged, but it is Signed-off-by: Joas Schilling <coding@schilljs.com>
* Don't call basename on nullJoas Schilling2019-10-011-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Correctly detect the mimetype from uploadsJoas Schilling2019-09-261-1/+1
| | | | Signed-off-by: Joas Schilling <coding@schilljs.com>
* Fix type hinting on setFileInfoJulius Härtl2019-09-102-2/+2
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* let a dedicate service serve a stateful processArthur Schiwon2019-09-096-27/+0
| | | | | | | | * includes making ICheck not requiring any context setter * and IFileCheck extending the IEntityCheck as entity data can be handed in via Dispatcher Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* require IChecks to receive entity contextArthur Schiwon2019-09-0910-45/+97
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* seperate setFileInfo from ICheckArthur Schiwon2019-09-098-42/+6
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* Extend missing check classesJulius Härtl2019-09-094-0/+54
| | | | Signed-off-by: Julius Härtl <jus@bitgrid.net>
* extends ICheck with scope and entity support, provide them as initialStateArthur Schiwon2019-09-097-0/+51
| | | | Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
* A folder should get a folder mimetypeRoeland Jago Douma2018-10-291-0/+5
| | | | | | | | | | | If doing achunked upload the mimetype of the folder would otherwise be guessed from the path. Which always returned application/octet-stream. If an access control rule to block that is in place this means that all chunked uploads fail hard in directories as the isCreatable on the directory always fails. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
* Ignore case for is and !isDaniel Kesselberg2018-10-051-4/+9
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>