From 4c12cee9abdaefbb89a77289ad271fda9524b4ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C4=81nis=20Mez=C4=ABtis?= Date: Fri, 4 Mar 2016 00:21:30 +0200 Subject: [PATCH] Deny empty password without request to vpn server --- jvpn.pl | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/jvpn.pl b/jvpn.pl index 9935450..1631512 100755 --- a/jvpn.pl +++ b/jvpn.pl @@ -141,9 +141,11 @@ } if ($cfgpass eq "interactive") { - print "Enter PIN+password: "; - $password=read_input("password"); - print "\n"; + do { + print "Enter PIN+password: "; + $password=read_input("password"); + print "\n"; + } while ( $password eq "" ); } elsif ($cfgpass =~ /^plaintext:(.+)/) { print "Using user-defined password\n"; @@ -192,9 +194,11 @@ elsif ($cfgpass eq "interactive" || $cfgpass =~ /^plaintext:/) { print "To continue, wait for the token code to change and ". "then enter the new pin and code.\n"; - print "Enter PIN+password: "; - $password=read_input("password"); - print "\n"; + do { + print "Enter PIN+password: "; + $password=read_input("password"); + print "\n"; + } while ( $password eq "" ); } elsif ($cfgpass =~ /^helper:(.+)/) { print "Using user-defined script to get second password\n";