diff options
| author | michael pereira | 2011-09-26 03:15:13 +0200 |
|---|---|---|
| committer | michael pereira | 2011-09-26 03:15:13 +0200 |
| commit | 722bd38f0fbd5adea8c4f86dcfa63bfbfde538a0 (patch) | |
| tree | a1f8e85af2842b826486657fd113641654edfb38 | |
| parent | menues ueberarbeitet (diff) | |
| download | pbs2-722bd38f0fbd5adea8c4f86dcfa63bfbfde538a0.tar.gz pbs2-722bd38f0fbd5adea8c4f86dcfa63bfbfde538a0.tar.xz pbs2-722bd38f0fbd5adea8c4f86dcfa63bfbfde538a0.zip | |
auth header
| -rw-r--r-- | application/modules/ipxe/controllers/AuthController.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php index 2923ea3..cc7bc1b 100644 --- a/application/modules/ipxe/controllers/AuthController.php +++ b/application/modules/ipxe/controllers/AuthController.php @@ -97,6 +97,12 @@ class Ipxe_AuthController extends Zend_Controller_Action $alpha = $this->_request->getParam('alpha'); $login = $this->_request->getParam('login'); + if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){ + header('WWW-Authenticate: Basic realm=""'); + header('HTTP/1.0 401 Unauthorized'); + exit; + } + if (isset($login)){ header('Content-Type: text/plain'); $result = "#!ipxe\n"; @@ -108,12 +114,6 @@ class Ipxe_AuthController extends Zend_Controller_Action exit; } - if(!isset($_SERVER['PHP_AUTH_USER']) || !isset($_SERVER['PHP_AUTH_PW'])){ - header('WWW-Authenticate: Basic realm=""'); - header('HTTP/1.0 401 Unauthorized'); - exit; - } - $email = $_SERVER['PHP_AUTH_USER']; $password = $_SERVER['PHP_AUTH_PW']; |
