summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2013-01-27 14:39:45 -0800
committerErmal Luçi <eri@pfsense.org>2013-01-27 14:39:45 -0800
commitc848008b51f3659fe2a9eb147f047ae62c3e9f7d (patch)
tree70ae854f3ab289beb953be7d490b5666e9d5d2dd /usr
parent349bf35803271f84960060b2dc13f98346469f89 (diff)
parent6c18a8100187726cd8b479dde34902ca55328c83 (diff)
downloadpfsense-c848008b51f3659fe2a9eb147f047ae62c3e9f7d.zip
pfsense-c848008b51f3659fe2a9eb147f047ae62c3e9f7d.tar.gz
Merge pull request #355 from bcyrill/cp_patch5
Change order of cpzone check
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/services_captiveportal_vouchers.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/usr/local/www/services_captiveportal_vouchers.php b/usr/local/www/services_captiveportal_vouchers.php
index d6919f6..3462ad6 100644
--- a/usr/local/www/services_captiveportal_vouchers.php
+++ b/usr/local/www/services_captiveportal_vouchers.php
@@ -36,15 +36,6 @@
##|*MATCH=services_captiveportal_vouchers.php*
##|-PRIV
-$cpzone = $_GET['zone'];
-if (isset($_POST['zone']))
- $cpzone = $_POST['zone'];
-
-if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) {
- header("Location: services_captiveportal_zones.php");
- exit;
-}
-
if ($_POST['postafterlogin'])
$nocsrf= true;
@@ -55,6 +46,15 @@ require("shaper.inc");
require("captiveportal.inc");
require_once("voucher.inc");
+$cpzone = $_GET['zone'];
+if (isset($_POST['zone']))
+ $cpzone = $_POST['zone'];
+
+if (empty($cpzone) || empty($config['captiveportal'][$cpzone])) {
+ header("Location: services_captiveportal_zones.php");
+ exit;
+}
+
if($_REQUEST['generatekey']) {
exec("/usr/local/bin/openssl genrsa 64 > /tmp/key64.private");
exec("/usr/local/bin/openssl rsa -pubout < /tmp/key64.private > /tmp/key64.public");
OpenPOWER on IntegriCloud