mirror of
https://github.com/nextcloud/passman.git
synced 2025-01-08 16:27:42 +08:00
Fix server DDOS due to encrypted files data
This commit is contained in:
parent
a413d48e5f
commit
a8c5d3f8c1
1 changed files with 4 additions and 3 deletions
|
@ -172,15 +172,15 @@ angular.module('passmanApp')
|
|||
};
|
||||
|
||||
var promise_credential_update = function(){
|
||||
console.log(this);
|
||||
service.getCredential(credential_id).then((function (credential) {
|
||||
this.parent.plain_credential = service.decryptCredential(credential, this.parent.old_password);
|
||||
this.parent.new_credential_cryptogram = service.encryptCredential(this.parent.plain_credential, this.parent.new_password);
|
||||
var tmp = angular.copy(this.parent.plain_credential);
|
||||
this.parent.new_credential_cryptogram = service.encryptCredential(tmp, this.parent.new_password);
|
||||
|
||||
this.call_progress(new progress_datatype(1, 2));
|
||||
|
||||
// Save data
|
||||
service.updateCredential(this.parent.new_credential_cryptogram, true).then((function(){
|
||||
service.updateCredential(this.parent.new_credential_cryptogram, true).then((function(data){
|
||||
this.call_progress(new progress_datatype(2, 2));
|
||||
this.call_then(this.parent.plain_credential);
|
||||
}).bind(this));
|
||||
|
@ -263,6 +263,7 @@ angular.module('passmanApp')
|
|||
}).then(function(data){
|
||||
master_promise.plain_credential = data;
|
||||
master_promise.promises ++;
|
||||
|
||||
(new C_Promise(promise_files_update, new password_data())).progress(function(data){
|
||||
master_promise.call_progress(data);
|
||||
}).then(function(data){
|
||||
|
|
Loading…
Reference in a new issue