Can not update private key
I updated ownCloud from 10.0.2 to 10.0.3. Then I copied my old files from a backup. Did the migration. ownCloud 10.0.3 runs. But after I login I see the message "Invalid private key for Encryption App. Please update your private key password in your personal settings to recover access to your encrypted files.". So I do, but I never get pass the "Saving...". The Console in Firefox gives me the error:
14:17:47.483 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data 1 settings-personal.js:22:61
OC.Encryption<.updatePrivateKeyPassword/< https://cloud.muellerpublic.de/apps/encryption/js/settings-personal.js:22:61
n.Callbacks/j https://cloud.muellerpublic.de/core/vendor/jquery/dist/jquery.min.js:2:26920
n.Callbacks/k.fireWith https://cloud.muellerpublic.de/core/vendor/jquery/dist/jquery.min.js:2:27738
x https://cloud.muellerpublic.de/core/vendor/jquery/dist/jquery.min.js:4:11276
.send/b/< https://cloud.muellerpublic.de/core/vendor/jquery/dist/jquery.min.js:4:14765
The offending code is (see the marked line):
/**
* Copyright (c) 2013, Sam Tuke <[email protected]>
* This file is licensed under the Affero General Public License version 3 or later.
* See the COPYING-README file.
*/
OC.Encryption = _.extend(OC.Encryption || {}, {
updatePrivateKeyPassword: function () {
var oldPrivateKeyPassword = $('input:password[id="oldPrivateKeyPassword"]').val();
var newPrivateKeyPassword = $('input:password[id="newPrivateKeyPassword"]').val();
OC.msg.startSaving('#ocDefaultEncryptionModule .msg');
$.post(
OC.generateUrl('/apps/encryption/ajax/updatePrivateKeyPassword'),
{
oldPassword: oldPrivateKeyPassword,
newPassword: newPrivateKeyPassword
}
).done(function (data) {
OC.msg.finishedSuccess('#ocDefaultEncryptionModule .msg', data.message);
})
.fail(function (jqXHR) {
**OC.msg.finishedError('#ocDefaultEncryptionModule .msg', JSON.parse(jqXHR.responseText).message);**
});
}
});
occ status
- installed: true
- version: 10.0.3.3
- versionstring: 10.0.3
- edition: Community
Can I update the private key manually? I mean per command line?
I also get the message in the logs:
{"reqId":"vfQ89j7AtdWOywlW9Egi","level":2,"time":"2017-11-05T14:14:08+00:00","remoteAddr":"37.252.124.149","user":"erwin","app":"no app in context","method":"POST","url":"\/login","message":"Could not decrypt the private key from user \"erwin\"\" during login. Assume password change on the user back-end. Error message: Bad Signature"}
I have also the following error if I try to upload files. Log-out and log-in doesn't solve it.
Encryption not ready: Private Key missing for user: please try to log-out and log-in again
In the Nginx logs I get the following:
/apps/encryption/ajax/updatePrivateKeyPassword returns HTTP error 503.
172.18.0.1 - - [05/Nov/2017:18:39:42 +0000] "POST /apps/encryption/ajax/updatePrivateKeyPassword HTTP/1.1" 503 8643 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0" "-"
Looks like the same bug as here: https://central.owncloud.org/t/encryption-problem-after-upgrade-10-0-2-to-10-0-3/9740
Can I update the private key manually? I mean per command line?
Can anyone weigh in on this? I would like to know how to do this for one of my users who has forgotten their old password.