Commit Graph

274 Commits

Author SHA1 Message Date
Bjoern Schiessle f2f5769df7 catch errors during decryption 2014-02-17 10:03:57 +01:00
Bjoern Schiessle 2ab062193a catch errors during initial encryption 2014-02-17 09:58:46 +01:00
Robin Appelman 181bbd4325 Remove usage of legacy OC_Appconfig 2014-02-13 16:28:49 +01:00
Jörn Friedrich Dreyer 2a6a9a8cef polish documentation based on scrutinizer patches 2014-02-06 17:02:21 +01:00
Bjoern Schiessle bef58f5361 don't expect OC_FilesystemView, this is depreciated 2014-01-31 20:39:52 +01:00
Bjoern Schiessle b489d6b0af fix infinite loop if folder and subfolder has the same name 2014-01-22 17:15:01 +01:00
Vincent Petry 06dec2632f Merge pull request #6512 from owncloud/master-failingoracletests
Removed numRows usage from encryption app
2013-12-19 08:22:44 -08:00
Björn Schießle 079f1a6f41 Merge pull request #6495 from owncloud/enc_fseek_fallback
Added fseek fallback to the encryption app
2013-12-19 07:09:07 -08:00
Vincent Petry 963ee31efb Removed numRows usage from encryption app
numRows on Oracle always seem to return 0.

This fix removes numRows usage from the encryption and sharing app.

This fixes unit tests and potentially the encryption app itself
(migration status) when running on Oracle
2013-12-19 15:51:24 +01:00
Bjoern Schiessle 4f8ae789ae extend the encryption stream wrapper to handle local files and add a fall back for file size calculation if the storage doesn't support fseek 2013-12-18 15:43:50 +01:00
Thomas Müller 930a46e8e2 Merge pull request #6469 from owncloud/enc_cleanup
remove duplicated code
2013-12-18 05:21:42 -08:00
Bjoern Schiessle 9a94c07553 remove unused method tail() 2013-12-17 16:19:00 +01:00
Bjoern Schiessle c955381d56 fall back to getLocalFile if storage doesn't support fseek 2013-12-17 16:18:05 +01:00
Bjoern Schiessle 69b89454a4 reliable detect encrypted files 2013-12-17 15:53:25 +01:00
Björn Schießle 575a68074f Merge pull request #6220 from owncloud/debug_oracle_errors
cherry-picks from #5884, just for debugging purpose
2013-12-06 10:00:04 -08:00
Bart Visscher 40f148cc6c Don't try to encrypt a file when the temp file isn't created 2013-12-06 17:01:13 +01:00
Bjoern Schiessle 9ff231590c set unencrypted_size to 0 after decryption... so that the unencrypted_size gets re-calculated if encryption was enabled again 2013-12-06 16:11:41 +01:00
Bjoern Schiessle 9371944e43 fix typo 2013-12-06 12:20:42 +01:00
Bjoern Schiessle 85467b973a add method to check if users private/public key exists 2013-12-06 12:20:14 +01:00
Bjoern Schiessle 1065c33543 Merge branch 'master' into encryption_initial_enc_indicator 2013-11-27 16:44:06 +01:00
Bjoern Schiessle 060e0ad0cd with the latest changes in master $this-userID is always the correct ID, so we no longer need the extra parameter 2013-11-27 15:35:32 +01:00
Bjoern Schiessle 9fb71af988 Merge branch 'master' into encryption_enable_public_upload
Conflicts:
	apps/files_encryption/lib/helper.php
	apps/files_encryption/lib/keymanager.php
	apps/files_encryption/lib/stream.php
	apps/files_encryption/lib/util.php
	apps/files_encryption/tests/keymanager.php
2013-11-27 15:08:09 +01:00
Bjoern Schiessle 7f3b178d73 some small changes according to the review comments 2013-11-27 11:46:24 +01:00
Bjoern Schiessle 35a6ad255d fix typo in var name 2013-11-26 11:38:45 +01:00
Bjoern Schiessle d6fb2afa85 show a message at the log-in screen if inital encryption take place 2013-11-25 23:49:05 +01:00
Bjoern Schiessle 87f2696e6a Merge branch 'encryption_work_with_public_gallery' into encryption_enable_public_upload 2013-11-21 11:18:53 +01:00
Bjoern Schiessle c7dc6dc2c2 fix getFileKey() call 2013-11-21 11:11:15 +01:00
Bjoern Schiessle 009bbef17e Merge branch 'encryption_work_with_public_gallery' into encryption_enable_public_upload 2013-11-21 10:34:25 +01:00
Bjoern Schiessle 16b484209c Merge branch 'master' into encryption_work_with_public_gallery
Conflicts:
	apps/files_encryption/lib/keymanager.php
	apps/files_encryption/lib/stream.php
	apps/files_encryption/lib/util.php
	apps/files_encryption/tests/crypt.php
2013-11-21 10:33:37 +01:00
Bjoern Schiessle 18c80e47b6 Merge branch 'encryption_work_with_public_gallery' into encryption_enable_public_upload
Conflicts:
	apps/files_encryption/lib/stream.php
2013-11-21 10:24:47 +01:00
Bjoern Schiessle 2b361ea085 better distinction between userID and keyId 2013-11-21 10:09:07 +01:00
Bjoern Schiessle b27fc42e1f public upload now also works with encryption enabled 2013-11-21 00:23:38 +01:00
Bjoern Schiessle b9c18d16fe make sure that we always use the correct user id 2013-11-20 23:23:23 +01:00
Bjoern Schiessle e11afd3066 fix some getShareKey() and getFileKey() calls 2013-11-20 22:44:23 +01:00
Bjoern Schiessle c5cb4206f5 [wip] make encryption work with public gallery sharing 2013-11-20 18:10:56 +01:00
Bjoern Schiessle f3e2a63712 check if it is a cached file or a version to resolve the correct path to the file key 2013-11-20 12:34:23 +01:00
Bjoern Schiessle 0c24c7c420 only check if the key file exists to decide if it is an encrypted file or not.
This solves problems with external storage which doesn't support fseek
2013-11-20 11:02:22 +01:00
Bjoern Schiessle b823505bd1 make sure that the owners home is mounted correctly 2013-11-19 18:28:51 +01:00
Bjoern Schiessle 222fa88eec Merge branch 'master' into encryption_fixes 2013-11-13 12:11:12 +01:00
Vincent Petry 3fa651f2b1 Merge pull request #5447 from owncloud/fixing-5117-master
No data corruption duriing parallel upload
2013-11-13 02:59:34 -08:00
Bjoern Schiessle 77429c28fd rename fixPartialFilePath() to stripPartialFileExtension(), this name describes better what the method actually does 2013-11-12 16:48:24 +01:00
Bjoern Schiessle 894856ce01 make sure that we keep the correct timestamp and etag after encryoption/decryption 2013-11-12 15:51:51 +01:00
Bjoern Schiessle 802213f7ec let encryption app detect transfer id in path and handle it correctly 2013-11-11 17:47:59 +01:00
Vincent Petry e246e2b669 Fixed encryption migration when entry is missing in DB
When resetting the DB and some users still have encrypted files, the
migration state isn't read properly becaue the migration entries are
missing. This causes the wrong file size to be returned.

This fix inserts the missing migration entry when this condition is met.

Fixes #5541
2013-10-25 15:38:35 +02:00
Markus Goetz af58360434 files_encryption: Fix getFileSize()
For certain file sizes, we rounded to the wrong chunk number
and the returned bogus results. This should fix
https://github.com/owncloud/mirall/issues/1009

Conflicts:
	apps/files_encryption/tests/util.php
2013-10-23 16:28:43 +02:00
Bjoern Schiessle eb348b776c set the init status to "NOT_INITIALIZED" if the encryption app gets enabled 2013-10-22 16:15:24 +02:00
Bjoern Schiessle f6e8a388a9 Merge branch 'master' into encryption_improved_error_messages_4617
Conflicts:
	settings/ajax/changepassword.php
2013-09-23 10:39:12 +02:00
Björn Schießle e0f18ec72b Merge pull request #4708 from owncloud/encryption_fixes
make sure that initial encryption also starts for a fresh installation
2013-09-18 01:33:52 -07:00
Bjoern Schiessle 82cbbb8ab8 Merge branch 'master' into encryption_improved_error_messages_4617
Conflicts:
	apps/files/index.php
2013-09-16 10:42:37 +02:00
Thomas Müller d5ddbfb045 Merge pull request #4719 from owncloud/port_4701_master
Always check variable type before using readdir to avoid surprises
2013-09-12 15:44:20 -07:00
Bjoern Schiessle b2dde14dbc coding style fixes 2013-09-06 16:07:18 +02:00
Bjoern Schiessle 93f4dec798 fix part file handling and real size calculation, this should also solve #4581
Conflicts:
	apps/files_encryption/lib/stream.php
2013-09-06 16:06:34 +02:00
Bjoern Schiessle f6830e7462 check shares for the real file and not for the .part file 2013-09-06 16:05:11 +02:00
Bjoern Schiessle 404e36323a first check if a extension exists before comparing it 2013-09-06 16:05:03 +02:00
Bjoern Schiessle 597a3cf1ad handle part files correctly 2013-09-06 16:04:56 +02:00
Bjoern Schiessle fb462e83cc no longer enforce log out, but provide useful errors/warnings instead 2013-09-06 12:27:40 +02:00
Arthur Schiwon c01675de5d more is_resource checks before readdir 2013-09-05 11:58:57 +02:00
Bjoern Schiessle 3d49631b8d make sure that initial encryption also starts for a fresh installation 2013-09-03 13:24:30 +02:00
Bjoern Schiessle bab63c22ee encryption error messages, distinguish between a re-enabled encryption app and a password change from outside 2013-09-02 11:26:11 +02:00
Bjoern Schiessle d7dca966a2 improved error messaging, initial commit 2013-08-30 10:17:50 +02:00
Bjoern Schiessle 1be11bb03d don't change the etags if a file gets encrypted/decrypted to avoid that the sync client downloads all files again 2013-08-18 11:21:01 +02:00
Bjoern Schiessle cabe92ef12 Merge branch 'master' into decrypt_files_again
Conflicts:
	apps/files_encryption/tests/keymanager.php
2013-08-17 13:15:22 +02:00
Bjoern Schiessle 7b1067c2a0 change decryptUnknownKeyfile() to decryptKeyfile(), we always use openssl_seal 2013-08-12 16:19:08 +02:00
Bjoern Schiessle 0bab8935c9 preserve mtime if file gets encrypted/decrypted 2013-08-12 14:30:43 +02:00
Bjoern Schiessle b982868c14 fix array declaration 2013-08-12 13:59:49 +02:00
Bjoern Schiessle 5ba8d38b7f remove old comments, TODos, etc. 2013-08-09 15:55:17 +02:00
Bjoern Schiessle 23e9721644 use OC\Files\View to read encrypted file, so that it also works with external storages 2013-07-31 16:35:14 +02:00
Bjoern Schiessle 2549322763 we need to use the path relative to data/ 2013-07-30 18:17:33 +02:00
Bjoern Schiessle 3640c99462 encrypt/decrypt file versions 2013-07-30 12:19:04 +02:00
Bjoern Schiessle a7a7ef2b3a improved error handling 2013-07-30 09:48:30 +02:00
Bjoern Schiessle b6fa0e4eef working decrypt files method 2013-07-29 17:06:05 +02:00
Björn Schießle 15cb8e4efd only check for external mount points if the external storage app is enabled 2013-07-05 16:00:34 +02:00
Björn Schießle af2cd6f541 always return normalized path 2013-07-05 15:59:57 +02:00
Björn Schießle eb2587a08f move isSystemWideMountPoint() to util.php 2013-07-05 15:59:29 +02:00
Björn Schießle 2e56f0e2f8 fix path to OC_Mount_Config 2013-07-05 15:59:06 +02:00
Björn Schießle 3e4dcafa89 handle system wide mount points 2013-07-05 15:58:55 +02:00
Jörn Friedrich Dreyer c79f7f4f3c fix numRows usage in files_encryption 2013-06-24 16:29:59 +02:00
Björn Schießle 83d98e2d8b add some more error messages, in case something went wrong 2013-06-19 15:52:33 +02:00
Florin Peter 8566881758 fix for path_hash not unique as reported at #3641 2013-06-13 20:52:34 +02:00
Florin Peter 35da408222 fix memory problems as reported at #3620 2013-06-13 20:51:22 +02:00
Björn Schießle 7cfb0dc406 Merge branch 'master' into files_encryption_check_private_key
Conflicts:
	apps/files_encryption/appinfo/app.php
	apps/files_encryption/lib/util.php
2013-06-13 13:17:35 +02:00
Björn Schießle bc2862fcb9 Merge branch 'master' into files_encryption_upgrade_fix 2013-06-13 12:53:29 +02:00
Björn Schießle 77944cf7b8 fix typo in var name 2013-06-13 10:11:23 +02:00
Björn Schießle 27fcdb3af5 Merge branch 'master' into files_encryption_upgrade_fix
Conflicts:
	apps/files_encryption/tests/crypt.php
2013-06-12 20:53:45 +02:00
Björn Schießle c78a90fd54 use number of manipulated rows as idicator if it was possible to enter the migration mode 2013-06-12 12:21:11 +02:00
Björn Schießle 20ddd6e1c7 Merge branch 'master' into files_encryption_check_private_key
Conflicts:
	apps/files_encryption/tests/crypt.php
2013-06-11 15:19:02 +02:00
Björn Schießle 3ec6b19cdf use constants for different migration status 2013-06-11 13:07:39 +02:00
Björn Schießle 5fafd55108 make sure that only one process can enter the migration mode 2013-06-11 12:03:50 +02:00
Jörn Friedrich Dreyer 124f34422c add missing backticks all over the place 2013-06-10 09:53:29 +02:00
Florin Peter dc8bcf0688 reformat code 2013-06-03 18:42:13 +02:00
Björn Schießle 471d2b732c introduce decryptPrivateKey() method which also checks if the result is a valid private key to avoid additional checks on various places 2013-06-03 14:19:31 +02:00
Florin Peter 1bfe975938 Merge branch 'master' into files_encryption_upgrade_fix
Conflicts:
	apps/files_encryption/lib/util.php
2013-05-31 12:58:12 +02:00
Florin Peter 8e324aad38 fix re-encrypt legacy files 2013-05-31 01:36:49 +02:00
Florin Peter 8c17f26226 fixed problems with file_get_contents and file_put_contents this problem was related to text editor with big text files 2013-05-30 01:13:22 +02:00
Florin Peter 313631edf6 Merge branch 'master' into file_encryption_external_storage_fixes
Conflicts:
	apps/files_encryption/hooks/hooks.php
2013-05-30 00:45:29 +02:00
Florin Peter 1202ab9995 Merge branch 'master' into file_encryption_external_storage_fixes 2013-05-29 19:19:40 +02:00
Florin Peter d265264542 fix for share folder on external storage 2013-05-29 19:11:39 +02:00
Björn Schießle b44192f366 check list of users with access to the file from the bottom to the top. This way we avoid calling getFileInfo() on every dir, which creates a lot of overhead, especially for external storages 2013-05-29 13:10:26 +02:00
Florin Peter efd629462e changes after review 2013-05-29 12:23:33 +02:00
Florin Peter c398fc59ad Merge branch 'master' into remove_unused_vars
Conflicts:
	apps/files_encryption/hooks/hooks.php
	apps/files_encryption/lib/proxy.php
	apps/files_encryption/lib/session.php
	apps/files_encryption/lib/stream.php
2013-05-29 09:21:00 +02:00