summaryrefslogtreecommitdiffstats
path: root/application/controllers
diff options
context:
space:
mode:
authorSimon2011-03-10 19:52:03 +0100
committerSimon2011-03-10 19:52:03 +0100
commit44110c242d23d30e5adca0aa0c74a024dcc27549 (patch)
treecbce3d6211b8ea2584831883f724e913d6fec786 /application/controllers
parentResourceController korrigiert (diff)
downloadpbs2-44110c242d23d30e5adca0aa0c74a024dcc27549.tar.gz
pbs2-44110c242d23d30e5adca0aa0c74a024dcc27549.tar.xz
pbs2-44110c242d23d30e5adca0aa0c74a024dcc27549.zip
verschleierung der primary keys
Diffstat (limited to 'application/controllers')
-rw-r--r--application/controllers/ResourceController.php24
1 files changed, 14 insertions, 10 deletions
diff --git a/application/controllers/ResourceController.php b/application/controllers/ResourceController.php
index 3ee7005..b70c589 100644
--- a/application/controllers/ResourceController.php
+++ b/application/controllers/ResourceController.php
@@ -4,7 +4,7 @@ class ResourceController extends Zend_Controller_Action
{
private $startval = 878923467;
- private $pass = "lsfks";
+ private $pass = array('lsfks_!$fks', 'un!fr€iburg', '0pen$lx_rulez', 'rand0mText');
public function init()
{
@@ -23,7 +23,7 @@ class ResourceController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender();
$bootosID = $this->_request->getParam('bootosID');
- $bootosID = $this->alphaID($bootosID, true, false, $this->pass);
+ $bootosID = $this->alphaID($bootosID, true, false, $this->pass[0]);
$bootosID -= $this->startval;
if(is_dir("../resources/bootos/$bootosID/initramfs/") && is_numeric($bootosID)){
@@ -47,7 +47,7 @@ class ResourceController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender();
$configID = $this->_request->getParam('configID');
- $configID = $this->alphaID($configID, true, false, $this->pass);
+ $configID = $this->alphaID($configID, true, false, $this->pass[1]);
$configID -= $this->startval;
if(is_dir("../resources/config/$configID/config/") && is_numeric($configID)){
@@ -70,7 +70,7 @@ class ResourceController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender();
$bootosID = $this->_request->getParam('bootosID');
- $bootosID = $this->alphaID($bootosID, true, false, $this->pass);
+ $bootosID = $this->alphaID($bootosID, true, false, $this->pass[2]);
$bootosID -= $this->startval;
if(is_dir("../resources/bootos/$bootosID/kernel/") && is_numeric($bootosID)){
@@ -93,6 +93,8 @@ class ResourceController extends Zend_Controller_Action
$this->_helper->viewRenderer->setNoRender();
$bmeID = $this->_request->getParam('bootmenuentryID');
+ $bmeID = $this->alphaID($bmeID, true, false, $this->pass[3]);
+ $bmeID -= $this->startval;
if(is_numeric($bmeID)){
$bmemapper = new Application_Model_BootMenuEntriesMapper();
@@ -125,15 +127,17 @@ class ResourceController extends Zend_Controller_Action
if($bme->getBootosID() != null){
$bootos = $bootosmapper->find($bme->getBootosID());
- $alpha_bootos = $this->alphaID($bootos->getID()+$this->startval, false, false, $this->pass);
- $alpha_config = $this->alphaID($bme->getConfigID()+$this->startval, false, false, $this->pass);
+ $alpha_init_bootos = $this->alphaID($bootos->getID()+$this->startval, false, false, $this->pass[0]);
+ $alpha_kernel_bootos = $this->alphaID($bootos->getID()+$this->startval, false, false, $this->pass[2]);
+ $alpha_bmeID = $this->alphaID($bmeID+$this->startval, false, false, $this->pass[3]);
+ $alpha_config = $this->alphaID($bme->getConfigID()+$this->startval, false, false, $this->pass[1]);
$return_val =
array(
- 'kernel' => $this->generateURL('getkernel', 'bootosID', $alpha_bootos),
- 'initramfs' => $this->generateURL('getinitramfs', 'bootosID', $alpha_bootos),
- 'kcl' => $this->generateURL('getkcl', 'bootmenuentryID', $bmeID),
- 'config' => $this->generateURL('getconfig', 'configID', $alpha_config)
+ 'kernel' => $this->generateURL('getkernel', 'bootosID', $alpha_kernel_bootos),
+ 'initramfs' => $this->generateURL('getinitramfs', 'bootosID', $alpha_init_bootos),
+ 'kcl' => $this->generateURL('getkcl', 'bootmenuentryID', $alpha_bmeID),
+ 'config' => $alpha_config
);
echo json_encode($return_val);