diff options
author | Miquel Lionel <lionel@les-miquelots.net> | 2021-07-17 22:01:05 +0100 |
---|---|---|
committer | Miquel Lionel <lionelmiquel@sfr.fr> | 2021-07-18 20:01:02 +0100 |
commit | 1208e3e3ffb1cc263d879f996b22e18c8b024d33 (patch) | |
tree | c168dcc3eff82020e767b1d22f71880118a92fef /genpass.pl | |
parent | e6d90c87b655db6c33724e5fb3b4001963c63736 (diff) | |
download | gpigeon-1208e3e3ffb1cc263d879f996b22e18c8b024d33.tar.gz gpigeon-1208e3e3ffb1cc263d879f996b22e18c8b024d33.zip |
fixes
- Makefile is better: the generated password via genpass.pl
or genpass.pl with -i flag should now be a correct argon2id hash
in both cases.
- Added missing checks in the makefile
- Fixed undeclared variables in gpigeon-template.cgi
Running make should be better and require less manual fiddling now.
Diffstat (limited to 'genpass.pl')
-rwxr-xr-x | genpass.pl | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -29,12 +29,13 @@ my $opt = $ARGV[0]; sub FillConfigMk { my $hash = shift; $hash =~ s/\$/\\044/g; + $hash =~ s/\\/\\\\/g; my $mkconfig = 'config.mk'; if (-e $mkconfig){ open my $in, '<', $mkconfig or die "$!"; open my $out, '>', "$mkconfig.tmp" or die "$!"; while (<$in>){ - s/ARGON2ID_HASH =.*/ARGON2ID_HASH = `printf "$hash"`/gi; + s/ARGON2ID_HASH =.*/ARGON2ID_HASH =$hash/gi; print $out $_; } close $out; |