diff options
author | Ermal Luçi <eri@pfsense.org> | 2013-01-27 14:39:45 -0800 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2013-01-27 14:39:45 -0800 |
commit | c848008b51f3659fe2a9eb147f047ae62c3e9f7d (patch) | |
tree | 70ae854f3ab289beb953be7d490b5666e9d5d2dd /usr | |
parent | 349bf35803271f84960060b2dc13f98346469f89 (diff) | |
parent | 6c18a8100187726cd8b479dde34902ca55328c83 (diff) | |
download | pfsense-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.php | 18 |
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"); |