Merge branch 'removeConsoleLog'

This commit is contained in:
brantje 2016-10-09 16:41:34 +02:00
commit 5907f1bca2
No known key found for this signature in database
GPG key ID: 5FF1D117F918687F
8 changed files with 13 additions and 31 deletions

View file

@ -305,8 +305,8 @@
$scope.$digest();
};
$scope.fileLoadError = function (error, file) {
console.log(error, file);
$scope.fileLoadError = function (error) {
console.log('Error loading file', error);
};
$scope.selected_file = '';

View file

@ -64,7 +64,6 @@
}
ShareService.getCredendialsSharedWithUs(vault.guid).then(function (shared_credentials) {
console.log('Shared credentials', shared_credentials);
for (var c = 0; c < shared_credentials.length; c++) {
var _shared_credential = shared_credentials[c];
var decrypted_key = EncryptService.decryptString(_shared_credential.shared_key);
@ -132,7 +131,6 @@
};
$scope.acceptShareRequest = function (share_request) {
console.log('Accepted share request', share_request);
var crypted_shared_key = share_request.shared_key;
var private_key = EncryptService.decryptString(VaultService.getActiveVault().private_sharing_key);
@ -356,7 +354,6 @@
};
$rootScope.$on('logout', function () {
console.log('Logout received, clean up');
$scope.active_vault = null;
$scope.credentials = [];
// $scope.$parent.selectedVault = false;
@ -365,7 +362,6 @@
$scope.downloadFile = function (credential, file) {
console.log(credential, file);
var callback = function (result) {
var key = null;
if (!result.hasOwnProperty('file_data')) {

View file

@ -178,8 +178,8 @@
$scope.$digest();
};
$scope.fileLoadError = function (error, file) {
console.log(error, file);
$scope.fileLoadError = function (error) {
console.log('Error loading file', error);
};
$scope.selected_file = '';
@ -228,7 +228,7 @@
//@TODO validation
//@TODO When credential is expired and has renew interval set, calc new expire time.
delete $scope.storedCredential.password_repeat;
console.log($scope.storedCredential);
if (!$scope.storedCredential.credential_id) {
$scope.storedCredential.vault_id = $scope.active_vault.vault_id;
CredentialService.createCredential($scope.storedCredential).then(function (result) {

View file

@ -199,8 +199,6 @@
if (index < _selected_credentials.length - 1) {
changeCredential(index + 1, oldVaultPass, newVaultPass);
} else {
console.log('Update complete!');
vault.private_sharing_key = EncryptService.decryptString(angular.copy(vault.private_sharing_key), oldVaultPass);
vault.private_sharing_key = EncryptService.encryptString(vault.private_sharing_key, newVaultPass);
VaultService.updateSharingKeys(vault).then(function (result) {

View file

@ -138,8 +138,7 @@
$scope.$watch('share_settings.upload_progress.done', function () {
console.log();
if ($scope.share_settings.upload_progress.done === $scope.share_settings.upload_progress.total && $scope.share_settings.upload_progress.total > 0) {
if ($scope.share_settings.upload_progress.done === $scope.share_settings.upload_progress.total && $scope.share_settings.upload_progress.total > 0) {
getAcl();
}
});
@ -204,9 +203,7 @@
_credential = CredentialService.encryptCredential(_credential, old_key);
CredentialService.updateCredential(_credential, true).then(function () {
NotificationService.showNotification('Credential unshared', 4000);
CredentialService.reencryptCredential(_credential.guid, old_key, new_key).progress(function (data) {
console.log(data);
}).then(function (data) {
CredentialService.reencryptCredential(_credential.guid, old_key, new_key).then(function (data) {
getAcl();
});
});
@ -224,14 +221,13 @@
user.vaults = data;
var start = new Date().getTime() / 1000;
ShareService.cypherRSAStringWithPublicKeyBulkAsync(user.vaults, enc_key)
.progress(function (data) {
.progress(function () {
$scope.share_settings.cypher_progress.done++;
$scope.share_settings.cypher_progress.percent = $scope.share_settings.cypher_progress.done / $scope.share_settings.cypher_progress.total * 100;
$scope.$digest();
})
.then(function (result) {
console.log("Took: " + ((new Date().getTime() / 1000) - start) + "s to cypher the string for user [" + data[0].user_id + "]");
$scope.share_settings.cypher_progress.times.push({
$scope.share_settings.cypher_progress.times.push({
time: ((new Date().getTime() / 1000) - start),
user: data[0].user_id
});
@ -257,8 +253,7 @@
$scope.share_settings.upload_progress.total = 0;
//Credential is already shared
if ($scope.storedCredential.shared_key && $scope.storedCredential.shared_key !== '' && $scope.storedCredential.shared_key !== null) {
console.log('Shared key found');
var enc_key = EncryptService.decryptString(angular.copy($scope.storedCredential.shared_key));
var enc_key = EncryptService.decryptString(angular.copy($scope.storedCredential.shared_key));
if ($scope.share_settings.linkSharing.enabled) {
var expire_time = new Date(angular.copy($scope.share_settings.linkSharing.settings.expire_time)).getTime() / 1000;
var shareObj = {
@ -298,10 +293,7 @@
var old_key = VaultService.getActiveVault().vaultKey;
CredentialService.reencryptCredential(encryptedSharedCredential.guid, old_key, key).progress(function (data) {
console.log(data);
}).then(function (data) {
console.log(data);
//This is here is not called
}).then(function (data) {
var _credential = data.cryptogram;
_credential.set_share_key = true;
_credential.skip_revision = true;

View file

@ -47,7 +47,6 @@
$scope.progress = progress > 0 ? 2 : 1;
$scope.$digest();
}).then(function (kp) {
console.log('stuff done');
$scope.generating = false;
var pem = ShareService.rsaKeyPairToPEM(kp);

View file

@ -116,13 +116,12 @@
try {
field_decrypted_value = EncryptService.decryptString(fieldValue, key);
} catch (e) {
console.log(e);
throw e;
}
try {
credential[field] = JSON.parse(field_decrypted_value);
} catch (e) {
console.log('Field' + field + ' in ' + credential.label + ' could not be parsed! Value:' + fieldValue);
console.warn('Field' + field + ' in ' + credential.label + ' could not be parsed! Value:' + fieldValue);
}

View file

@ -165,13 +165,12 @@
try {
field_decrypted_value = EncryptService.decryptString(fieldValue, sharedKey);
} catch (e) {
console.log(e);
throw e;
}
try {
_credential[field] = JSON.parse(field_decrypted_value);
} catch (e) {
console.log('Field' + field + ' in ' + _credential.label + ' could not be parsed! Value:' + fieldValue);
console.warn('Field' + field + ' in ' + _credential.label + ' could not be parsed! Value:' + fieldValue);
throw e;
}
}
@ -185,7 +184,6 @@
var step = function () {
// run for 100 ms
if (!forge.pki.rsa.stepKeyPairGenerationState(state, 100)) {
// console.log(state);
if (state.p !== null) {
// progress(50);
this.call_progress(50);