summaryrefslogtreecommitdiffstats
path: root/application/modules/ipxe/controllers/AuthController.php
diff options
context:
space:
mode:
Diffstat (limited to 'application/modules/ipxe/controllers/AuthController.php')
-rw-r--r--application/modules/ipxe/controllers/AuthController.php29
1 files changed, 15 insertions, 14 deletions
diff --git a/application/modules/ipxe/controllers/AuthController.php b/application/modules/ipxe/controllers/AuthController.php
index c884098..6fdfcbe 100644
--- a/application/modules/ipxe/controllers/AuthController.php
+++ b/application/modules/ipxe/controllers/AuthController.php
@@ -102,23 +102,22 @@ class Ipxe_AuthController extends Zend_Controller_Action
$result = "#!ipxe\n";
$result .= "imgfree\n";
$result .= "login\n";
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n";
+ $result .= "http://\${username:uristring}:\${password:uristring}@".$_SERVER['HTTP_HOST']."/ipxe/auth/login/alpha/".$alpha."\n";
header("Content-Length: ".(strlen($result)));
echo $result;
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'];
-
- $email = 'test';
- $password = 'test';
+ $email = $_SERVER['PHP_AUTH_USER'];
+ $password = $_SERVER['PHP_AUTH_PW'];
$auth = Zend_Auth::getInstance();
$adapter = new Zend_Auth_Adapter_DbTable($this->db, 'pbs_person', 'email', 'password', 'MD5(CONCAT(?, password_salt))');
@@ -164,15 +163,17 @@ class Ipxe_AuthController extends Zend_Controller_Action
$this->error = "session";
}
- header('Content-Type: text/plain');
-
- $result = "#!ipxe\n";
- $result .= "imgfree\n";
- $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$alpha."/error/$this->error\n";
-
- header("Content-Length: ".(strlen($result)));
+// header('Content-Type: text/plain');
+//
+// $result = "#!ipxe\n";
+// $result .= "imgfree\n";
+// $result .= "chain http://".$_SERVER['HTTP_HOST']."/ipxe/vesamenu.c32 http://".$_SERVER['HTTP_HOST']."/ipxe/resource/getvesamenuconfig/alpha/".$alpha."/error/$this->error\n";
+//
+// header("Content-Length: ".(strlen($result)));
+
+// echo $result;
+ $this->_redirect('/ipxe/resource/getvesamenuconfig/alpha/'.$alpha.'/error/'.$this->error);
- echo $result;
}
public function switchgroupAction(){