Commit Graph

776 Commits

Author SHA1 Message Date
Arthur Schiwon c9132261c8 implement specific rename handling for SMB 2016-05-31 13:32:11 +02:00
Robin McCorkell 4ea7a349d2 Fix SMB backend registration 2016-05-30 21:25:10 +01:00
Lukas Reschke aba539703c
Update license headers 2016-05-26 19:57:24 +02:00
Vincent Petry ae4ee56997 Merge pull request #24814 from owncloud/fix-psr4-external-maste
Move Stuff to PSR-4 again
2016-05-25 09:12:17 +02:00
Vincent Petry e8c3794308 Merge pull request #7897 from owncloud/ext-swiftcaching
Added object cache for Swift ext storage
2016-05-24 16:21:30 +02:00
Joas Schilling 794c566244
Move Stuff to PSR-4 again 2016-05-24 16:10:22 +02:00
Vincent Petry f7d102ccc5 Merge pull request #24799 from owncloud/altyr-117-upstream
Update google-api-php-client to 1.1.7
2016-05-24 14:46:10 +02:00
Vincent Petry 648fc8d916 skip google map files (#24807) 2016-05-24 14:45:29 +02:00
Robin Appelman 8a40003169 fix phpdoc 2016-05-24 13:58:08 +02:00
Robin Appelman c031eafd84 Fix cert bundle path 2016-05-24 13:44:43 +02:00
Vincent Petry f77a11a876
Added object cache for Swift ext storage
This avoid calling the remote API for repeated calls to is_dir,
filetype, etc
2016-05-24 13:29:29 +02:00
Vincent Petry 4635ed7748
Fix autoloading for new google SDK lib 2016-05-24 12:22:30 +02:00
Francesco Rovelli 49bec94959
enable autoload of lib in google storage 2016-05-24 12:22:30 +02:00
Joas Schilling 3eba0c479f
Fix import path for 3rdparty dropbox autoloader
We moved the file by one level
2016-05-24 12:15:53 +02:00
Joas Schilling 64538740ec
Fix missing imports 2016-05-24 08:41:22 +02:00
Joas Schilling f14dff680d
Move remaining classes to PSR-4 2016-05-24 08:41:22 +02:00
Joas Schilling 4576891f10
Move Lib\Storage to PSR-4 2016-05-24 08:41:22 +02:00
Joas Schilling b9fd7d4cc7
Move Config to PSR-4 2016-05-24 08:41:21 +02:00
Joas Schilling 6ea54e73e8
Move Lib\Backend to PSR-4 2016-05-24 08:41:21 +02:00
Joas Schilling 6d7a1b9bd4
Move Lib\Auth to PSR-4 2016-05-24 08:41:21 +02:00
Joas Schilling 328b3c47d7
Move stuff from outside lib/ to PSR-4 2016-05-24 08:41:20 +02:00
Vincent Petry 4728308a9e Merge pull request #24585 from owncloud/files_external_lazy
Load external storage backends/auth mechanisms lazily
2016-05-19 18:08:17 +02:00
Vincent Petry 5585fa0a68 Merge pull request #24630 from owncloud/one-shall-adjust-the-path
Use proper path
2016-05-17 10:11:21 +02:00
Robin McCorkell af0930fe59 Introduce backend/auth mechanism providers
Direct registration of backends/auth mechanisms is now deprecated
2016-05-11 21:16:26 +01:00
Lukas Reschke 0d8393178b
Use proper path
Fixes https://github.com/owncloud/core/issues/24407
2016-05-03 14:37:50 +02:00
Robin McCorkell 43abe2b648 Add links to load GDrive/Dropbox configuration pages 2016-05-03 11:30:02 +01:00
Robin McCorkell de98a6e54c Allow multiple custom JS files 2016-05-03 11:30:02 +01:00
Vincent Petry 4326d73ff6
Fix SMB storage to not normalize UTF8
This makes sure that even if a NFD file name exists, it is found by the
storage and will be visible to higher layers. Even though the file will
be discarded anyway there, it gives the scanner a chance to display a
warning at least.
2016-04-29 16:19:53 +02:00
Robin Appelman baff79cc63 Fix loading the dropbox autoloader 2016-04-15 12:46:47 +02:00
Robin McCorkell 9a78cac2eb Fix OCA\Files\External\Api namespace 2016-04-14 00:49:47 +01:00
Robin McCorkell 4717605d22 Fix storage backend class namespaces and move to subdir
All classes that were previously \OC\Files\Storage\FooBar are now
\OCA\Files_External\Lib\Storage\FooBar
2016-04-14 00:44:28 +01:00
Thomas Müller 690eef26dd Merge pull request #23274 from Senorsen/add-urlencode-ftp-sftp
Add urlencode to username part of ftp and sftp links
2016-03-31 23:18:10 +02:00
Frank Karlitschek 6d40e69e29 Merge pull request #23517 from owncloud/gdrive-stream-download
GDrive stream download with RetryWrapper
2016-03-31 21:17:10 +02:00
Thomas Müller dea3985e86 Merge pull request #23516 from owncloud/dropbox-stream-download
Dropbox stream download with RetryWrapper
2016-03-31 20:07:36 +02:00
Thomas Müller 8394985e14 Merge pull request #23672 from owncloud/use-retry-wrapper-for-sftp
Use RetryWrapper for SFTP storage
2016-03-31 11:24:47 +02:00
Lukas Reschke 3dc5c59e57 Use RetryWrapper for SFTP storage
Equivalent to https://github.com/owncloud/core/pull/23442

Required for making encryption work with external storage reliable.
2016-03-30 22:45:09 +02:00
Vincent Petry 7be541bda1 GDrive stream download with RetryWrapper 2016-03-30 18:39:41 +02:00
Lukas Reschke bd93722e12 Use the shipped cacerts.pem instead of the global one
The one we ship may cause problems since Equifax is not included anymore (SHA-1 certs) are deprecated. We should just be consistent here and also use the certificate file which is used by the other calls in the library.
2016-03-30 16:58:39 +02:00
Vincent Petry 02c2568442 Dropbox stream download with RetryWrapper 2016-03-23 18:06:01 +01:00
Thomas Müller 5e4f9b8627 Merge pull request #23440 from owncloud/fix_22286
apply retry wrapper to make sure that we always read/write a complete block
2016-03-22 09:50:05 +01:00
Thomas Müller 2357bbf80a Merge pull request #23439 from owncloud/smb-permissions
properly use smb permissions
2016-03-21 18:05:45 +01:00
Thomas Müller 736b80f0cb Merge pull request #23323 from owncloud/gdrive-chunkupload
Chunk upload for GDrive
2016-03-21 18:02:55 +01:00
Bjoern Schiessle f761733f17 apply retry wrapper to make sure that we always read/write a complete block 2016-03-21 17:39:43 +01:00
Robin Appelman 8ab70b1231 properly use smb permissions 2016-03-21 14:35:41 +01:00
Thomas Müller 0bc51b9118 Merge pull request #23272 from owncloud/dropbox-downloadnotthefullfileinmemory
Fix dropbox storage to not store the whole file in memory
2016-03-17 20:52:41 +01:00
Vincent Petry 5db41dfbed Only use GDrive chunks when needed 2016-03-17 12:36:47 +01:00
Vincent Petry aa2674e7e2 Chunk upload for GDrive
Instead of storing the WHOLE file in memory in a PHP variable, use the
library's chunk upload support.
2016-03-16 17:57:54 +01:00
Robin Appelman d498282e12 handle connection errors as storage not available in smb 2016-03-16 13:15:54 +01:00
Senorsen a6631eceb4 Add urlencode to username part of ftp and sftp links
according to #17796
2016-03-16 01:49:40 +08:00
Vincent Petry ab50ba7a58 Fix dropbox storage to not store the whole file in memory
Since the library can only store the full response in memory on
download, we use an alternate client lib and set the correct headers to
be able to stream the content to a temp file.
2016-03-15 18:05:27 +01:00
Robin Appelman a8db587b1f move failedstorage to core 2016-03-11 13:15:45 +01:00
Robin Appelman 3bd6fc797d dont break when there is an invalid share 2016-03-11 13:15:45 +01:00
Lukas Reschke d14adb2351 Fix compatibility with PHP 5.4
Fixes https://github.com/owncloud/core/issues/22960
2016-03-08 18:04:24 +01:00
Vincent Petry 4255dd2b39 Properly set exception in FailedStorage 2016-03-03 14:37:23 +01:00
Robin Appelman 6990100e6e allow availability recheck for external storages 2016-03-03 14:19:34 +01:00
Lukas Reschke c353d51810 Remove Scrutinizer Auto Fixer 2016-03-01 17:48:23 +01:00
Lukas Reschke 933f60e314 Update author information
Probably nice for the people that contributed to 9.0 to see themselves in the AUTHORS file :)
2016-03-01 17:25:15 +01:00
Thomas Müller 914ac09aae Merge pull request #22636 from owncloud/fix-ssl-on-external-storages
Fix HTTPS support on external storages
2016-02-25 14:36:00 +01:00
Thomas Müller 202bf17e4a Merge pull request #22604 from owncloud/fix-google-drive-encryption
Copy into local file
2016-02-25 14:35:39 +01:00
Lukas Reschke aebb900cd4 More error handling 2016-02-25 10:12:31 +01:00
Lukas Reschke 3b5ddb417c Copy into local file
Using the Guzzle stream directly here will only return 1739 characters for `fread` instead of all data. This leads to the problem that the stream is read incorrectly and thus the data cannot be properly decrypted => 💣

This approach copies the data into a local temporary file, as done before in all stable releases as well as other storage connectors.

While this approach will load the whole file into memory, this is already was has happened before in any stable release as well. See d608c37c90 for the breaking change.

To test this enable Google Drive as external storage and upload some files with encryption enabled. Reading the file should fail now.

Fixes https://github.com/owncloud/core/issues/22590
2016-02-25 09:40:30 +01:00
Lukas Reschke db2ddb5441 Properly cast type
The current logic is checking whether:

1. The returned value is a boolen
2. The returned value is a string and then matches for "true"

Since the config is now written to the database the data is now a string with the value "1" if HTTPS is set to true. Effectively this option was thus always disabled at the moment, falling back to plain HTTP.

This change casts the data to a boolean if it is defined as boolean.

Fixes https://github.com/owncloud/core/issues/22605
Fixes https://github.com/owncloud/core/issues/22016
2016-02-24 19:58:41 +01:00
Vincent Petry 4829a2d421 Disable sharing by default for external storage mounts
This is for newly created mount points.

Migrated mount points will have sharing enabled as before.
2016-02-24 13:58:21 +01:00
Thomas Müller ae2304f23f Merge pull request #22405 from owncloud/gdrive-mimetype-and-office-fixes
Fix GDrive handling of office files
2016-02-19 09:13:35 +01:00
Thomas Müller bfd4a9548b Merge pull request #22408 from owncloud/gdrive-remove-mimetype-detection
Fix GDrive mime type detection with encryption
2016-02-18 10:14:01 +01:00
Robin Appelman c2c6caee93 remove global credentials 2016-02-17 13:55:27 +01:00
Robin Appelman 176fb191b7 remove login credentails and user provided backends 2016-02-16 15:27:55 +01:00
Vincent Petry d38b71f206 Fix GDrive mime type detection with encryption
When encryption is enabled, GDrive would think that all files are text
files. This fix falls back to the extension based detection when a
non-special mime type is returned
2016-02-15 17:09:08 +01:00
Vincent Petry 075dd54f6c Fix GDrive handling of office files
1) Properly detect empty file extension, can be null.

2) When renaming part file to final file, use the correct file name
without extension, if it exists

3) When renaming a file, do not delete the original file if it had the
same id, which can happen with part files
2016-02-15 16:49:12 +01:00
Robin Appelman edbe5d7b6d handle forbidden exceptions in smb backend 2016-02-10 16:52:13 +01:00
Robin Appelman 87179eaae2 Add tests 2016-02-08 15:53:46 +01:00
Robin Appelman 678a3abf6d handle no user set for personal global auth 2016-02-08 13:45:52 +01:00
Robin Appelman 54d2175bf5 Add occ files_external:create command to add new mounts 2016-02-05 14:20:22 +01:00
Thomas Müller 342c2aac98 Merge pull request #20920 from owncloud/issue_20888
Add dialog to enter credentials on errored mount point
2016-02-05 10:05:23 +01:00
Robin Appelman b7d27ab141 fix warning caused by global auth 2016-02-04 16:53:13 +01:00
Robin Appelman d83b1f3b8b fix error code for unconfigured user provided auth 2016-02-04 16:47:41 +01:00
Robin Appelman b12d449ec7 set read permissions on failed mount root 2016-02-04 16:41:27 +01:00
Robin Appelman e420ae068c handle exception in availibilty check 2016-02-04 16:33:08 +01:00
Robin Appelman 2e3a5ccaaa show failed external storages properly 2016-02-04 16:33:08 +01:00
Jesús Macias 8fa96435b0 Add credentials dialog for user provided auth 2016-02-04 16:33:08 +01:00
Robin Appelman 9dfe9f77f2 Add global auth backend for files external 2016-02-04 14:57:17 +01:00
Robin Appelman f4e1a1677b Remove magic flags from files_external backend params 2016-02-02 15:10:59 +01:00
Vincent Petry 04b88b4aaa Reword external storage auth backends 2016-02-01 12:20:21 +01:00
Robin Appelman d0f5687687 Dont set null values when validating storage definition 2016-01-29 14:51:30 +01:00
Robin Appelman efcf790eff minor fixes 2016-01-29 14:51:30 +01:00
Robin Appelman 03c79ac24f remove custom controler for user provided password auth 2016-01-29 14:51:30 +01:00
Robin Appelman 5bdcd534b1 dont show user provided auth as option for personal mounts 2016-01-29 14:51:30 +01:00
Robin Appelman 860d51487b Allow setting user provided credentials from the personal settings page 2016-01-29 14:51:30 +01:00
Robin Appelman 419507c118 Add user provided credentials mechanism 2016-01-29 14:50:52 +01:00
Robin Appelman adbc5a0b41 Fix invalid storages not showing in directory listing 2016-01-29 14:50:52 +01:00
Robin Appelman 54e58b520c Handle no user set in sftp constructor 2016-01-26 14:48:45 +01:00
Thomas Müller 0a4142d5df Merge pull request #19002 from UoM-ResPlat-DevOps/swift-streaming-download
Streaming download from Swift in files_external
2016-01-22 17:27:41 +01:00
Thomas Müller 9b4c9a0357 Merge pull request #18531 from owncloud/ext-user-credentials
External storage 'Login credentials' auth mechanism
2016-01-22 13:14:14 +01:00
Robin McCorkell 3fe802d931 Introduce 'login credentials' auth mechanism
Stores user credentials in the database after user login, uses the new
CredentialsManager class
2016-01-18 11:10:41 +01:00
Vincent Petry d608c37c90 Use Guzzle stream to download files from GDrive
The API library does not support streaming and always reads the full
file into memory.

This workaround copies the signed headers to a Guzzle request and
returns the response as stream.
2016-01-14 17:52:30 +01:00
Thomas Müller 5565b19382 Merge pull request #21648 from owncloud/smb-statcache-cap
cap the number of entries we cache in smb's statcache
2016-01-13 10:33:43 +01:00
Thomas Müller 682821c71e Happy new year! 2016-01-12 15:02:18 +01:00
Robin Appelman d8d6368dd7 cap the number of entries we cache in smb's statcache 2016-01-12 13:26:58 +01:00
Daniel Tosello 8783eb99f7 Modified swift handling to explicitly set 404 responses to false 2016-01-12 16:47:52 +11:00
Thomas Müller d7d0cfc775 Merge pull request #21008 from owncloud/UoM-ResPlat-DevOps-swift-acl-shared-containers
Allowing access to Swift containers shared by ACL
2016-01-08 20:13:13 +01:00