Julius Härtl
00e62171d2
Test for locking state in key generation
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2020-08-14 07:58:41 +07:00
Morris Jobke
234b510652
Change PHPDoc type hint from PHPUnit_Framework_MockObject_MockObject to \PHPUnit\Framework\MockObject\MockObject
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2020-08-12 13:55:19 +07:00
Christoph Wurst
cb057829f7
Update license headers for 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-29 11:57:22 +07:00
Christoph Wurst
1584c9ae9c
Add visibility to all methods and position of static keyword
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 16:51:06 +07:00
Christoph Wurst
caff1023ea
Format control structures, classes, methods and function
...
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>
2020-04-10 14:19:56 +07:00
Christoph Wurst
14c996d982
Use elseif instead of else if
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-10 10:35:09 +07:00
Christoph Wurst
afbd9c4e6e
Unify function spacing to PSR2 recommendation
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 13:54:22 +07:00
Christoph Wurst
41b5e5923a
Use exactly one empty line after the namespace declaration
...
For PSR2
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 11:48:10 +07:00
Christoph Wurst
2fbad1ed72
Fix (array) indent style to always use one tab
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-04-09 10:16:08 +07:00
Christoph Wurst
1a9330cd69
Update the license headers for Nextcloud 19
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-31 14:52:54 +07:00
Christoph Wurst
463b388589
Merge pull request #20170 from nextcloud/techdebt/remove-unused-imports
...
Remove unused imports
2020-03-27 17:14:08 +07:00
Christoph Wurst
b80ebc9674
Use the short array syntax, everywhere
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-26 16:34:56 +07:00
Christoph Wurst
2ee65f177e
Use the shorter phpunit syntax for mocked return values
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:21:27 +07:00
Christoph Wurst
74936c49ea
Remove unused imports
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2020-03-25 22:08:08 +07:00
Christoph Wurst
5bf3d1bb38
Update license headers
...
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
2019-12-05 15:38:45 +07:00
Roeland Jago Douma
9761822aeb
TO REVERT LATER: fix UserHooksTest
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:28 +07:00
Roeland Jago Douma
3a7cf40aaa
Mode to modern phpunit
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 15:27:18 +07:00
Roeland Jago Douma
c007ca624f
Make phpunit8 compatible
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-27 13:34:41 +07:00
Roeland Jago Douma
68748d4f85
Some php-cs fixes
...
* Order the imports
* No leading slash on imports
* Empty line before namespace
* One line per import
* Empty after imports
* Emmpty line at bottom of file
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2019-11-22 20:52:10 +07:00
Joas Schilling
16d47b5928
Fix wrongly mixed mock objects in encryption tests
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2019-09-15 12:04:28 +07:00
Roeland Jago Douma
372f3d2a60
Remove deprecated functions from SecureRandom
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2018-12-07 19:33:32 +07:00
Bjoern Schiessle
87657fffd8
skip already encrypted files on encrypt all command
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-10-24 16:53:39 +07:00
Bjoern Schiessle
3adc2aca53
add occ command to recover encrypted files in case of password lost
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-08-16 15:51:01 +07:00
Julius Härtl
0dd519cff1
Fix encryption admin section tests
...
Signed-off-by: Julius Härtl <jus@bitgrid.net>
2018-08-02 10:26:09 +07:00
Bjoern Schiessle
8042e6b8fb
this was a migration step to ownCloud 8.0 to restructure the encryption folder which is no longer needed
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2018-03-02 10:09:52 +07:00
Joas Schilling
3917a54113
Class "ProgressBar" is declared "final" and cannot be mocked.
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-25 11:33:26 +07:00
Joas Schilling
bf2be08c9f
Fix risky tests without assertions
...
Signed-off-by: Joas Schilling <coding@schilljs.com>
2018-01-25 11:33:25 +07:00
Morris Jobke
0eebff152a
Update license headers
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-11-06 16:56:19 +07:00
Morris Jobke
c733cdaa65
Use ::class in test mocks of encryption app
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-26 13:56:56 +07:00
Morris Jobke
43e498844e
Use ::class in test mocks
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 17:45:32 +07:00
Morris Jobke
99934134dc
Use DI for IAppManager to encryption migration
...
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-10-24 15:52:00 +07:00
Kenneth Newwood
7092c50e7c
print generated encryption key passwords directly after generating the keys so that errors during the encryption do not lead to a potentially massive data loss
...
Signed-off-by: Kenneth Newwood <kenneth@newwood.name>
2017-09-11 12:52:25 +07:00
Bjoern Schiessle
001a9c02dd
adjust encryption tests to the new master key default
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-07-06 11:47:12 +07:00
Bjoern Schiessle
5f75468aa4
improve status messages
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-07-06 11:47:11 +07:00
Morris Jobke
1729e4471f
Update comments to Nextcloud
...
* based on PR by @Ardinis
* see #4311
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
2017-04-11 23:16:27 +07:00
Vincent Petry
6b9ef15803
Use master key for public links as well
2017-03-24 14:55:42 +07:00
Vincent Petry
305718370a
Add tests for null user
2017-03-24 14:55:33 +07:00
Bjoern Schiessle
9ce32d9941
always throw a encryption exception
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-03-14 12:11:28 +07:00
Bjoern Schiessle
fcda3a20f4
create new encryption keys on password reset and backup the old one
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2017-01-10 17:04:32 +07:00
Bjoern Schiessle
8a401ee156
check if session is initialized
...
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
2016-11-23 12:20:43 +07:00
Roeland Jago Douma
6c5f7d586e
Fix migration tests
...
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
2016-10-13 19:40:44 +07:00
Joas Schilling
5e5e5b77d5
Fix encryption app
2016-09-12 16:48:11 +07:00
Roeland Jago Douma
680b557a4b
Fix apps warnings
2016-09-07 20:42:38 +07:00
Roeland Jago Douma
0c154c1ed7
Fix getMock encryption
2016-09-06 09:29:27 +07:00
Lukas Reschke
7ffb7b0d84
Use MockBuilder instead of createMock
...
CI uses an older PHPUnit
2016-08-15 16:43:22 +07:00
Lukas Reschke
8a7a0f3287
Add unit tests
2016-08-15 16:25:34 +07:00
Joas Schilling
0215b004da
Update with robin
2016-07-21 18:13:58 +07:00
Joas Schilling
813f0a0f40
Fix apps/
2016-07-21 18:13:57 +07:00
Lukas Reschke
aba539703c
Update license headers
2016-05-26 19:57:24 +07:00
Joas Schilling
4a3311f430
Move Encryption app to PSR-4 ( #24524 )
...
* Move Encryption to PSR-4
* Move encryption tests to PSR-4
* Fix the tests
2016-05-12 09:42:19 +07:00
Bjoern Schiessle
d86f8ba5f8
if we don't have a encrypted file key we can return a empty string right away
2016-04-26 11:06:55 +07:00
Bjoern Schiessle
088ffd05d7
don't create a private-/public-key pair for each user if the master key is enabled
2016-04-26 11:06:55 +07:00
Vincent Petry
b50d3255fb
Merge pull request #22791 from owncloud/enc_master_key_improvements
...
Enc master key improvements
2016-04-21 11:48:26 +07:00
Björn Schießle
a3381b1d0c
we need to initialize the mount points of the given user before we recover
...
access to his files
2016-04-19 17:04:21 +07:00
Roeland Jago Douma
7f4f0b20ad
Fix encryption tests
2016-04-08 15:23:17 +07:00
Bjoern Schiessle
89223379ad
replaceUserKeys() actually deletes the users keys -> update method name and doc-block
2016-03-18 11:06:14 +07:00
Bjoern Schiessle
5e267589d4
only create and update user specific key if no master key is enabled
2016-03-18 11:06:14 +07:00
Bjoern Schiessle
9de4a8338e
allow group shares, even if not all public keys are available
2016-03-15 11:33:19 +07:00
Lukas Reschke
c353d51810
Remove Scrutinizer Auto Fixer
2016-03-01 17:48:23 +07: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 +07:00
Bjoern Schiessle
95ea2ccb53
make decrypt all work with the master key
2016-02-29 14:54:32 +07:00
Bjoern Schiessle
9dc759b4dc
remember signature version and only set it on update to make sure that other
...
apps like files_versions still get the old signature version
2016-02-10 13:27:32 +07:00
Lukas Reschke
ca350294a6
Add tests for setVersion
2016-02-09 23:43:28 +07:00
Lukas Reschke
6724f76573
Use cache and add tests
2016-02-09 23:43:27 +07:00
Björn Schießle
9bb97c714b
fixing unit tests
2016-02-09 23:43:26 +07:00
Björn Schießle
40a5ba72fc
sign all encrypted blocks and check signature on decrypt
2016-02-09 23:43:25 +07:00
Lukas Reschke
d25b8dacb3
Use AES-256-CTR as default
...
CTR is recommended over CFB mode.
2016-02-09 23:43:24 +07:00
Thomas Müller
e0aa6e01ab
Merge pull request #21612 from owncloud/fix_21598
...
fix public link sharing if the master key is enabled
2016-01-13 10:34:48 +07:00
Thomas Müller
682821c71e
Happy new year!
2016-01-12 15:02:18 +07:00
Björn Schießle
46f6c289ca
only use master key ID if a user is logged in. Otherwise keep the public link share key
2016-01-11 13:09:06 +07:00
Lukas Reschke
00a01a8de2
Fix PHPDoc + Add handling for error cases
...
Makes static code analyzers happier.
2016-01-07 21:30:44 +07:00
Roeland Jago Douma
1f715289bf
Removed deprecated function OC_User::deleteUser
...
Replaced with proper OCP calls
2015-12-17 16:18:40 +07:00
Roeland Jago Douma
835911bce5
Removed deprecated private OC_User::createUser
...
All function calls are replaced with the recommended (which was already
the body of the function).
2015-12-17 16:18:40 +07:00
Scrutinizer Auto-Fixer
be4c3a8b56
Scrutinizer Auto-Fixes
...
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-11-27 15:32:44 +07:00
Bjoern Schiessle
5fad45b230
make encryption configurable for home storage
2015-10-27 14:24:20 +07:00
Lukas Reschke
8f09d5b67c
Update license headers
2015-10-26 14:04:01 +07:00
Robin Appelman
d636bce8a4
fix encryption migration test
2015-10-16 21:41:51 +07:00
Robin Appelman
8efd037eb8
Make shared folder size propagation test work with object home storage
2015-10-16 21:41:51 +07:00
Morris Jobke
b945d71384
update licence headers via script
2015-10-05 21:15:52 +07:00
Thomas Müller
b59c42e5df
Merge pull request #18983 from owncloud/fix_18926
...
check for the right user if we can change his password
2015-09-18 11:59:57 +07:00
Bjoern Schiessle
9bd4f2d41e
occ script to disable encryption and to decrypt all files again
2015-09-15 22:39:44 +07:00
Bjoern Schiessle
7f459c64cb
check for the right user if we can change his password
2015-09-14 11:49:16 +07:00
Bjoern Schiessle
b2e6d7b5f4
occ command to enable master key
2015-09-08 14:58:42 +07:00
Bjoern Schiessle
acfc7d7c4d
enable usage of a master key
2015-09-07 16:08:41 +07:00
Bjoern Schiessle
166e57cf61
return false if private key is not valid
2015-08-30 15:31:19 +07:00
Bjoern Schiessle
f893de4136
use login name for password reset
2015-08-30 15:31:19 +07:00
Björn Schießle
6e210d960c
Merge pull request #18423 from owncloud/occ_encrypt_all
...
occ command line tool to encrypt all files
2015-08-28 20:44:55 +07:00
Bjoern Schiessle
8c08dd0ac2
occ tool to encrypt all files
2015-08-26 14:58:22 +07:00
Lukas Reschke
cca35f0c3e
Merge pull request #18121 from owncloud/enc_improve_privkey_encryption
...
use password hash to encrypt private key
2015-08-24 12:03:27 +07:00
Joas Schilling
e6eb74958f
Remove unnecessary DB prefixes from existing query builder usages
2015-08-10 16:21:41 +07:00
Bjoern Schiessle
62bc0e5264
use password hash instead of the plain password to encrypt the private key
2015-08-07 15:21:08 +07:00
Bjoern Schiessle
2f4bebb045
only update database on the first run (first run = we have a version number from the old encryption app)
2015-07-31 10:47:02 +07:00
Joas Schilling
f77e5f411d
Fix existing usages by removing the quotes
2015-07-21 15:25:47 +07:00
Joas Schilling
de348180ae
Use the public interface and our method instead of the doctrine thing
2015-07-21 15:25:47 +07:00
Bjoern Schiessle
570dd17d4f
fix mount point detection
2015-07-20 16:00:33 +07:00
Bjoern Schiessle
4dba920fdd
unit tests
2015-07-17 15:19:10 +07:00
Bjoern Schiessle
3000f0125f
don't move keys if the key where already moved in a previous migration run
2015-07-17 15:19:10 +07:00
Thomas Müller
d6f02eb703
Merge pull request #17500 from owncloud/encryption_migration_improvements
...
Only clean up if migration finished succesfully
2015-07-16 14:03:21 +07:00
Bjoern Schiessle
1e284b15ff
only create new key pair if both keys are missing
2015-07-08 19:08:41 +07:00
Bjoern Schiessle
876d7c160d
more secure way to update the database
2015-07-08 13:26:53 +07:00