From: Michael Tremer Date: Thu, 5 Mar 2020 12:55:45 +0000 (+0000) Subject: vpnmain.cgi: Generate random UUIDs X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=205c3c17c63d5c7480e7907c08c28abd8bfc2be1;p=people%2Fms%2Fipfire-2.x.git vpnmain.cgi: Generate random UUIDs Signed-off-by: Michael Tremer --- diff --git a/html/cgi-bin/vpnmain.cgi b/html/cgi-bin/vpnmain.cgi index 8cd43c3052..601fc74927 100644 --- a/html/cgi-bin/vpnmain.cgi +++ b/html/cgi-bin/vpnmain.cgi @@ -19,6 +19,7 @@ # # ############################################################################### +use Data::UUID; use MIME::Base64; use Net::DNS; use File::Copy; @@ -1184,11 +1185,14 @@ END &General::readhasharray("${General::swroot}/vpn/config", \%confighash); my $key = $cgiparams{'KEY'}; - my $uuid1 = "AAAABBBB"; - my $uuid2 = "CCCCDDDD"; + # Create a UUID generator + my $uuid = Data::UUID->new(); + + my $uuid1 = $uuid->create_str(); + my $uuid2 = $uuid->create_str(); my $cert = ""; - my $cert_uuid = "123456789"; + my $cert_uuid = $uuid->create_str(); # Read and encode certificate if ($confighash{$key}[4] eq "cert") {