create new encryption keys on password reset and backup the old one#2918
create new encryption keys on password reset and backup the old one#2918MorrisJobke merged 1 commit intomasterfrom
Conversation
|
@schiessle, thanks for your PR! By analyzing the history of the files in this pull request, we identified @nickvergessen, @LukasReschke and @rullzer to be potential reviewers. |
|
@GitHubUser4234 this also solves the logging issue, discussed here #2563 |
|
Thanks @schiessle for remembering the issue :) Would be glad if you could also join the discussion at #2920, thanks a lot! |
1f51678 to
ef07f7c
Compare
|
reviews needed... cc @LukasReschke @nickvergessen @nextcloud/encryption @zecke @boldandbusted maybe you can also test if this fixes your issues mentioned above... Thanks! |
| } | ||
|
|
||
| public function prePasswordReset($params) { | ||
| if (App::isEnabled('encryption')) { |
There was a problem hiding this comment.
Is this needed? I don't think so, because otherwise the core would not be loaded at all...
apps/encryption/lib/KeyManager.php
Outdated
| * @param string $purpose | ||
| * @param bool $timestamp | ||
| * @param bool $includeUserKeys | ||
| * @param strinf $uid |
Signed-off-by: Bjoern Schiessle <bjoern@schiessle.org>
ef07f7c to
fcda3a2
Compare
nickvergessen
left a comment
There was a problem hiding this comment.
Other then the typos works
Current coverage is 53.90% (diff: 77.77%)@@ master #2918 diff @@
=========================================
Files 1302 1302
Lines 79394 80059 +665
Methods 7900 7904 +4
Messages 0 0
Branches 1245 1245
=========================================
+ Hits 5841 43158 +37317
+ Misses 73553 36901 -36652
Partials 0 0
|
|
Only one more review needed... Who wants to click the "merge" button and close three issues at once? 😉 |
|
Would be awesome to get a second review... @icewind1991 @LukasReschke @MorrisJobke |
|
When setup encryption, set a recovery password, activate the recovery feature for the user, upload an image and then recover the password old files can't be accessed anymore. I got following error: |
|
Yeah, that is expected and unchanged. The difference is you can at least create new files now. |
Ah okay - this worked fine. |
Some improvements how password reset is handled:
We backup the users private/public key and create new one (that's the most common use case)
fix #2907
fix #427
fix #2908