mirror of
https://git.proxmox.com/git/pve-common
synced 2025-08-04 17:56:46 +00:00
PVE::ACME - untaint saved account data
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
parent
34d8999638
commit
bf5e9f8440
@ -152,7 +152,9 @@ sub load {
|
||||
my ($self) = @_;
|
||||
return if $self->{loaded};
|
||||
$self->{loaded} = 1;
|
||||
my $data = fromjs(file_get_contents($self->{path}));
|
||||
my $raw = file_get_contents($self->{path});
|
||||
if ($raw =~ m/^(.*)$/s) { $raw = $1; } # untaint
|
||||
my $data = fromjs($raw);
|
||||
$self->{$_} = $data->{$_} for @SAVED_VALUES;
|
||||
if (defined(my $keystr = $data->{key})) {
|
||||
my $key = Crypt::OpenSSL::RSA->new_private_key($keystr);
|
||||
|
Loading…
Reference in New Issue
Block a user