Skip to content

Commit

Permalink
Fix failure on the upload of PGP keys (#3970)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilaliv3 committed Jan 24, 2024
1 parent a3d81a4 commit 917c0f9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions backend/globaleaks/handlers/user/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ def parse_pgp_options(user, request):
if not remove_key and pgp_key_public:
pgpctx = PGPContext(pgp_key_public)
user.pgp_key_public = pgp_key_public
user.can_redact_information = request['can_redact_information']
user.can_mask_information = request['can_mask_information']
user.pgp_key_fingerprint = pgpctx.fingerprint
user.pgp_key_expiration = pgpctx.expiration
else:
Expand Down
3 changes: 2 additions & 1 deletion client/app/js/controllers/admin/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ GL.controller("AdminUserTabCtrl", ["$scope",
$scope.loadPublicKeyFile = function(file) {
$scope.Utils.readFileAsText(file).then(function(txt) {
$scope.user.pgp_key_public = txt;
}, $scope.Utils.displayErrorMsg);
return $scope.saveUser();
});
};

$scope.setPassword = function() {
Expand Down
3 changes: 2 additions & 1 deletion client/app/js/controllers/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@ GL.controller("PreferencesCtrl", ["$scope", "$q", "$http", "$location", "$window
$scope.loadPublicKeyFile = function(file) {
$scope.Utils.readFileAsText(file).then(function(txt) {
$scope.resources.preferences.pgp_key_public = txt;
}, $scope.Utils.displayErrorMsg);
return $scope.save();
});
};
}]).
controller("TwoFactorModalCtrl",
Expand Down

0 comments on commit 917c0f9

Please sign in to comment.