aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Changelog1
-rwxr-xr-xlacme3
2 files changed, 3 insertions, 1 deletions
diff --git a/Changelog b/Changelog
index 14add81..92b8a4d 100644
--- a/Changelog
+++ b/Changelog
@@ -20,6 +20,7 @@ lacme (0.8.1) upstream;
user/group name.
- lacme: ignore empty values in settings 'chown', 'chmod', 'certificate'
and 'certificate-chain'.
+ - lacme: return an error when the 'mode'/'chown' isn't a number.
-- Guilhem Moulin <guilhem@fripost.org> Mon, 22 Feb 2021 12:04:28 +0100
diff --git a/lacme b/lacme
index 2d9202d..b52cddd 100755
--- a/lacme
+++ b/lacme
@@ -689,7 +689,8 @@ sub install_cert(%) {
my $mode;
if ((my $m = $args{mode}) ne "") {
- $mode = oct($m) // die;
+ die "Not an octal string: $m\n" unless $m =~ /^[0-9]+$/;
+ $mode = oct($m);
} else {
my $umask = umask() // die;
$mode = 0644 &~ $umask;