aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/lib/Lib/Storage
Commit message (Collapse)AuthorAgeFilesLines
* fix(files_external): Check key exists before accessing itfixKeyExFileExtGit'Fellow2024-09-141-4/+8
| | | Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
* style: update codestyle for coding-standard 1.2.3Daniel Kesselberg2024-08-257-26/+26
| | | | Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
* Merge branch 'master' into jr-readdir-false-falseJohn Molakvoæ2024-08-1610-324/+277
|\ | | | | Signed-off-by: John Molakvoæ <skjnldsv@users.noreply.github.com>
| * feat: add a specialized writeStream implementation for s3 external storageRobin Appelman2024-07-241-0/+21
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix: Do not log an error when connecting to SFTP without a logged in userDaniel Calviño Sánchez2024-06-181-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When connecting to a SFTP server from a SFTP storage the host key is checked against the known host keys stored in a file in the data directory of the logged in Nextcloud user. The path to the file is (indirectly) got using "OC_App::getStorage", which logs an error if called when there is no logged in user; this can happen, for example, if the storage is used from a background job or a command. Not being able to read or write the file just causes the host key check to be skipped, but it has no other consequence. Moreover, even with logged in users it is likely that the file can not be read either and the check is also skipped, as the file needs to have been manually created by an admin. Due to all that now the path to the file is directly created using a View rather than relying on "OC_App::getStorage" to prevent the unneeded error from being logged. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
| * chore: Add SPDX headerAndy Scherzinger2024-06-0610-261/+26
| | | | | | | | Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
| * fix(files_external): Be extra safe with null handling to please psalmCôme Chilliet2024-04-301-0/+3
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix: Fix small psalm errors in FTP and LDAP connectionsCôme Chilliet2024-04-091-4/+1
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix: Remove obsolete resource typingCôme Chilliet2024-04-091-2/+2
| | | | | | | | | | | | In PHP>=8.1, LDAP and FTP resources are always typed objects Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix: Apply new coding standard to all filesCôme Chilliet2024-04-022-2/+2
| | | | | | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
| * fix: replace `Account name` by `Login`John Molakvoæ2024-02-131-1/+1
| | | | | | | | Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
| * feat: rename users to account or personVincent Petry2024-02-131-1/+1
| | | | | | | | | | | | Replace translated text in most locations Signed-off-by: Vincent Petry <vincent@nextcloud.com>
| * fix(files_external): list root when using SMB case-insensitive optionBenjamin Gaussorgues2024-02-051-1/+2
| | | | | | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
| * chore: apply changes from Nextcloud coding standards 1.1.1Joas Schilling2023-11-233-8/+4
| | | | | | | | | | Signed-off-by: Joas Schilling <coding@schilljs.com> Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
| * Merge pull request #41053 from nextcloud/bug/smb/in-place-case-renameBenjamin Gaussorgues2023-10-311-0/+19
| |\ | | | | | | fix(files_external): on case insensitive system, block case change
| | * fix(files_external): on case insensitive system, block case changeBenjamin Gaussorgues2023-10-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | When a file/directory is renamed to the same name with only case change, the rename fail. We block this kind of rename. The user will have to rename to another name first. Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
| * | Return correct status if touch failedLouis Chemineau2023-10-231-11/+13
| |/ | | | | | | Signed-off-by: Louis Chemineau <louis@chmn.me>
| * use multipart copy for s3Robin Appelman2023-09-201-4/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * sftp psalm fixesRobin Appelman2023-09-182-11/+15
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * psalm suppressRobin Appelman2023-09-041-0/+4
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * implement fseek for sftp read streamRobin Appelman2023-09-042-3/+30
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * more optimized getPermissions/getMetaDataRobin Appelman2023-09-041-0/+44
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * sftp optimize file_put_contents, writeStream and copyRobin Appelman2023-09-041-1/+55
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * fix error during sftp stream closeRobin Appelman2023-09-041-0/+7
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * clear sftp stat cache when opening a write streamRobin Appelman2023-09-041-3/+5
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
| * Migrate files external to PSR LoggerInterfaceBenjamin Gaussorgues2023-08-012-19/+27
| | | | | | | | Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
| * handle more exceptions in AmazonS3::fopenRobin Appelman2023-07-131-1/+1
| | | | | | | | Signed-off-by: Robin Appelman <robin@icewind.nl>
* | Clean-up some remaining readdir calls with undesirable false evaluation ↵Josh Richards2023-06-241-2/+2
|/ | | | | | potential Signed-off-by: Josh Richards <josh.t.richards@gmail.com>
* Merge pull request #38591 from nextcloud/fix/caching/avoid-haskey-getSimon L2023-06-121-2/+3
|\ | | | | fix(caching): Avoid checking existence before fetching
| * fix(caching): Avoid checking existence before fetchingChristoph Wurst2023-06-121-2/+3
| | | | | | | | | | | | | | | | The cache might expire between checking for key existence and fetching the value. In this rare case the code continues with a null value when it doesn't expect one. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
* | Update apps/files_external/lib/Lib/Storage/SMB.phpFaraz Samapoor2023-06-051-3/+1
| | | | | | | | Co-authored-by: Côme Chilliet <91878298+come-nc@users.noreply.github.com> Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* | Refactors "strpos" calls in /apps/files_external to improve code readability.Faraz Samapoor2023-06-024-8/+10
|/ | | | Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
* Update AmazonS3.phpJames Guo2023-04-061-1/+1
| | | Signed-off-by: James Guo <i@ze3kr.com>
* improve handling of files we can't access in the scannerRobin Appelman2023-04-051-8/+16
| | | | | | | | instead of erroring, remove the items from the cache. this situation can be triggered if a user has access to a file but looses it afterwards Signed-off-by: Robin Appelman <robin@icewind.nl>
* fix ftp external storage with filezilla serverRobin Appelman2023-03-302-7/+15
| | | | | | | - filezilla doesn't like "" as parameter for `mdtm` (all others seem fine) - filezilla sends fractional modified date Signed-off-by: Robin Appelman <robin@icewind.nl>
* Respect OCP interface in private classesCôme Chilliet2023-02-071-1/+1
| | | | | | | Because the parameter type was moved to phpdoc it needs to be removed from implementations Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Strong type filesize related methods to ease 32bits problem findingsCôme Chilliet2023-02-071-1/+1
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* Support of s3 storage class in External Storage applicationFrançois Ménabé2023-01-121-1/+2
| | | | Signed-off-by: François Ménabé <francois.menabe@gmail.com>
* Fix psalm issues related to signature changes from PHP 8.0Côme Chilliet2022-12-291-3/+0
| | | | Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
* fix s3 directory copyRobin Appelman2022-11-151-3/+3
| | | | 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>
* Rename file1 and file2 to source and target in Storage abstractionCarl Schwan2022-10-187-67/+67
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Additional type hinting found by psalmCarl Schwan2022-10-181-1/+1
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Fix usage of streamsCarl Schwan2022-10-172-4/+4
| | | | | | always return a bool and type the handle as a string Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Use argument name from parent classCarl Schwan2022-10-172-15/+15
| | | | | | This will be an issue with php 8, so best to fix it now Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Port away from deprecated clearBucket callCarl Schwan2022-10-161-9/+2
| | | | | | | | | | This was removed a long time ago in the library that we use, but never detected since this was inside a try catch block... Remove the call for now and we should investigate newer api in the future. Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Port to LoggerInterfaceCarl Schwan2022-10-161-10/+44
| | | | Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* Force cast getCode to intCarl Schwan2022-10-161-7/+7
| | | | | | Otherwise psalm complains that the type can also be a non-falsy-string Signed-off-by: Carl Schwan <carl@carlschwan.eu>
* handle AccessDenied error when checking if external s3 support versionsMatthieu Gallien2022-07-281-1/+1
| | | | Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
* Move CappedMemoryCache to OCPCarl Schwan2022-07-143-3/+3
| | | | | | | | This is an helpful helper that should be used in more place than just server and this is already the case with groupfodlers, deck, user_oidc and more using it, so let's make it public Signed-off-by: Carl Schwan <carl@carlschwan.eu>