Commit Graph

693 Commits

Author SHA1 Message Date
Vincent Petry 280c288bc0
Convert Dropbox Forbidden exception to StorageNotAvailableException 2016-06-20 17:37:55 +02:00
Thomas Müller e3cc82df38 Merge pull request #23518 from owncloud/stable9-gdrive-stream-download
[stable9] GDrive stream download with RetryWrapper
2016-03-31 23:14:49 +02:00
Frank Karlitschek 05fd4f2da0 Merge pull request #23522 from owncloud/stable9-dropbox-stream-download
[stable9] Dropbox stream download with RetryWrapper
2016-03-31 21:18:29 +02:00
Thomas Müller cfe0a6450e Merge pull request #23673 from owncloud/stable9-fix-sftp-retry-wrapper
[stable9] Use RetryWrapper for SFTP storage
2016-03-31 11:12:29 +02:00
Lukas Reschke 1f7b037a59 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 23:01:42 +02:00
Vincent Petry 99843c06f9 GDrive stream download with RetryWrapper 2016-03-30 18:43:01 +02:00
Lukas Reschke 57596e1415 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:55:26 +02:00
Vincent Petry 195cf4111e Dropbox stream download with RetryWrapper 2016-03-23 18:07:13 +01:00
Vincent Petry 443d72ee87 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-23 18:07:13 +01:00
Thomas Müller 5ca10cf6f8 Merge pull request #23308 from owncloud/smb-not-available-9
[9.0] handle connection errors as storage not available in smb
2016-03-23 11:03:15 +01:00
Thomas Müller a9c13dc58a Merge pull request #23361 from owncloud/stable9-gdrive-chunkupload
[stable9] Chunk upload for GDrive
2016-03-22 21:27:14 +01:00
Thomas Müller 49b5b1b08c Merge pull request #23447 from owncloud/smb-permissions-9
[9.0] properly use smb permissions
2016-03-22 17:12:41 +01:00
Robin Appelman 77afc18b82 properly use smb permissions 2016-03-22 09:57:38 +01:00
Bjoern Schiessle 627724bc6a apply retry wrapper to make sure that we always read/write a complete block 2016-03-21 15:18:13 +01:00
Vincent Petry 1e1c0885c6 Only use GDrive chunks when needed 2016-03-17 16:12:42 +01:00
Vincent Petry 8e0b78c746 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-17 16:12:38 +01:00
Robin Appelman 95cd1671b3 handle connection errors as storage not available in smb 2016-03-16 14:47:03 +01:00
Robin Appelman 9d688e655d move failedstorage to core 2016-03-15 12:49:12 +01:00
Robin Appelman f29440dbbc dont break when there is an invalid share 2016-03-15 12:49:06 +01:00
Lukas Reschke 1975ffa9e7 Fix compatibility with PHP 5.4
Fixes https://github.com/owncloud/core/issues/22960
2016-03-08 19:58:49 +01:00
Vincent Petry 8e8f5cdddf Properly set exception in FailedStorage 2016-03-03 20:07:22 +01:00
Robin Appelman f603c57751 allow availability recheck for external storages 2016-03-03 20:07:18 +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