]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
captive: Don't compare action string
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 25 Apr 2017 11:32:05 +0000 (12:32 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 22 Sep 2017 17:54:45 +0000 (18:54 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
html/cgi-bin/captive/index.cgi
html/html/captive/template.html

index 8067f25d9763638b156cb747d834588ee87cbdf3..05619b47c3238b3dcb09c80830cb53d4883a7a91 100755 (executable)
@@ -53,8 +53,8 @@ unless (-f $clients){ system("touch $clients"); }
 #Read settings
 &General::readhash("$settingsfile", \%settings) if(-f $settingsfile);
 
 #Read settings
 &General::readhash("$settingsfile", \%settings) if(-f $settingsfile);
 
-#Actions
-if ($cgiparams{'ACTION'} eq "$Lang::tr{'gpl i accept these terms and conditions'}"){
+# Actions
+if ($cgiparams{'ACTION'} eq "SUBMIT") {
        #Get Clients IP-Address
        my $ip_address = $ENV{X_FORWARDED_FOR} || $ENV{REMOTE_ADDR} ||"";
 
        #Get Clients IP-Address
        my $ip_address = $ENV{X_FORWARDED_FOR} || $ENV{REMOTE_ADDR} ||"";
 
@@ -82,7 +82,7 @@ if ($cgiparams{'ACTION'} eq "$Lang::tr{'gpl i accept these terms and conditions'
        }       
 }
 
        }       
 }
 
-if ($cgiparams{'ACTION'} eq "$Lang::tr{'Captive activate'}"){
+if ($cgiparams{'ACTION'} eq "SUBMIT") {
        my $ip_address;
        my $mac_address;
        my $granted=0;
        my $ip_address;
        my $mac_address;
        my $granted=0;
index 26f4142089b7a8e668a0b1d15dfb3f4bfba01cf6..369532a084e1d7207335da4af22d0fa80e9d74e2 100644 (file)
@@ -30,6 +30,7 @@
                                                        </TMPL_IF>
 
                                                        <form action="" method="POST">
                                                        </TMPL_IF>
 
                                                        <form action="" method="POST">
+                                                               <input type="hidden" name="ACTION" value="SUBMIT">
                                                                <input type="hidden" name="url" value="<TMPL_VAR NAME="URL">">
 
                                                                <TMPL_IF NAME="VOUCHER">
                                                                <input type="hidden" name="url" value="<TMPL_VAR NAME="URL">">
 
                                                                <TMPL_IF NAME="VOUCHER">