Skip to content

Commit

Permalink
This fixes the decryption error happening when auto login is enabled …
Browse files Browse the repository at this point in the history
…and user changes vault password.
  • Loading branch information
brantje committed Dec 28, 2016
1 parent ed6fd19 commit daeaa8f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 8 deletions.
26 changes: 20 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,20 @@
owncloud-passman (0.0.1)
* **Security**: Security description here
* **Backwards incompatible change**: Changes in the API
* **New dependency**: New dependencies such as a new ownCloud or PHP version
* **Bugfix**: Bugfix description
* **Enhancement**: New feature description
## [Unreleased]
### Updated
- Updated to passman 2.0.0

## 2.0.0 – 2016-12-31
### Added
- Password sharing
- Vaults
- Change vault passwords
- Unit tests

### Changed
- Passman API overhaul
- Rewrite of code base
- New passman repo at https://github.com/nextcloud/passman
### Fixed
- A lot of small bug fixes

### Removed
- Old passman API
15 changes: 13 additions & 2 deletions js/app/controllers/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,15 +203,26 @@
$scope.error = $translate.instant('password.no.match');
return;
}
SettingsService.setSetting('defaultVault', null);
SettingsService.setSetting('defaultVaultPass', null);
VaultService.getVault($scope.active_vault).then(function (vault) {
var _selected_credentials = [];
if (vault.credentials.length === 0) {
$location.path('/');
}
for (var i = 0; i < vault.credentials.length; i++) {
var _credential = vault.credentials[i];
if (_credential.shared_key === null || _credential.shared_key === '') {
_selected_credentials.push(_credential);
if (_credential.shared_key === null || _credential.shared_key === '' || !_credential.hasOwnProperty('acl')) {
var _success;
try{
CredentialService.decryptCredential(_credential, VaultService.getActiveVault().vaultKey);
_success = true;
} catch (e){
_success = false;
}
if(_success) {
_selected_credentials.push(_credential);
}
}
}
$scope.change_pw = {
Expand Down

0 comments on commit daeaa8f

Please sign in to comment.