From 6e24ccb5b4df1fdca68ee78e7f988d3abc01b247 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Fri, 14 Dec 2007 08:46:31 +0000 Subject: [PATCH] Changed scripts to use ->getBaseDir() instead of ->getValue('basedir'). git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@106 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Bindings/SAML20/HTTPPost.php | 4 ++-- lib/SimpleSAML/Bindings/Shib13/HTTPPost.php | 4 ++-- lib/SimpleSAML/XHTML/Template.php | 8 ++++---- lib/SimpleSAML/XML/AttributeFilter.php | 2 +- lib/SimpleSAML/XML/MetaDataStore.php | 2 +- www/auth/login-ldapmulti.php | 2 +- www/saml2/idp/metadata.php | 2 +- 7 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php index 924ed9afe..33c2a00a9 100644 --- a/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php +++ b/lib/SimpleSAML/Bindings/SAML20/HTTPPost.php @@ -84,8 +84,8 @@ class SimpleSAML_Bindings_SAML20_HTTPPost { $publiccert = "/home/as/erlang/feide2/cert/server.crt"; */ - $privatekey = $this->configuration->getValue('basedir') . '/cert/' . $idpmd['privatekey']; - $publiccert = $this->configuration->getValue('basedir') . '/cert/' . $idpmd['certificate']; + $privatekey = $this->configuration->getBaseDir() . '/cert/' . $idpmd['privatekey']; + $publiccert = $this->configuration->getBaseDir() . '/cert/' . $idpmd['certificate']; if (!file_exists($privatekey)) throw new Exception('Could not find private key file [' . $privatekey . '] which is needed to sign the authentication response'); diff --git a/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php b/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php index 0b4b07206..e12b54da1 100644 --- a/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php +++ b/lib/SimpleSAML/Bindings/Shib13/HTTPPost.php @@ -77,8 +77,8 @@ class SimpleSAML_Bindings_Shib13_HTTPPost { throw new Exception('Could not find AssertionConsumerService for SP entity ID [' . $spentityid. ']. ' . 'Claimed ACS is: ' . (isset($claimedacs) ? $claimedacs : 'N/A')); - $privatekey = $this->configuration->getValue('basedir') . '/cert/' . $idpmd['privatekey']; - $publiccert = $this->configuration->getValue('basedir') . '/cert/' . $idpmd['certificate']; + $privatekey = $this->configuration->getBaseDir() . '/cert/' . $idpmd['privatekey']; + $publiccert = $this->configuration->getBaseDir() . '/cert/' . $idpmd['certificate']; if (strstr($claimedacs, $destination) == 0) { diff --git a/lib/SimpleSAML/XHTML/Template.php b/lib/SimpleSAML/XHTML/Template.php index 37c93f109..e558e5531 100644 --- a/lib/SimpleSAML/XHTML/Template.php +++ b/lib/SimpleSAML/XHTML/Template.php @@ -69,20 +69,20 @@ class SimpleSAML_XHTML_Template { private function includeAtTemplateBase($file) { $data = $this->data; - $filebase = $this->configuration->getValue('basedir') . $this->configuration->getValue('templatedir'); + $filebase = $this->configuration->getBaseDir() . $this->configuration->getValue('templatedir'); include($filebase . $file); } private function includeAtLanguageBase($file) { $data = $this->data; - $filebase = $this->configuration->getValue('basedir') . $this->configuration->getValue('templatedir') . $this->getLanguage() . '/' ; + $filebase = $this->configuration->getBaseDir() . $this->configuration->getValue('templatedir') . $this->getLanguage() . '/' ; include($filebase . $file); } public function show() { $data = $this->data; - $filename = $this->configuration->getValue('basedir') . $this->configuration->getValue('templatedir') . $this->getLanguage() . '/' . + $filename = $this->configuration->getBaseDir() . $this->configuration->getValue('templatedir') . $this->getLanguage() . '/' . $this->template; @@ -92,7 +92,7 @@ class SimpleSAML_XHTML_Template { // echo 'Could not find template file [' . $this->template . '] at [' . $filename . ']'; // exit(0); - $filename = $this->configuration->getValue('basedir') . $this->configuration->getValue('templatedir') . + $filename = $this->configuration->getBaseDir() . $this->configuration->getValue('templatedir') . $this->configuration->getValue('language.default') . '/' . $this->template; diff --git a/lib/SimpleSAML/XML/AttributeFilter.php b/lib/SimpleSAML/XML/AttributeFilter.php index df72c5ba1..6ce5599ae 100644 --- a/lib/SimpleSAML/XML/AttributeFilter.php +++ b/lib/SimpleSAML/XML/AttributeFilter.php @@ -27,7 +27,7 @@ class SimpleSAML_XML_AttributeFilter { public function namemap($map) { - $mapfile = $this->configuration->getValue('basedir') . $this->configuration->getValue('attributenamemapdir') . $map . '.php'; + $mapfile = $this->configuration->getBaseDir() . $this->configuration->getValue('attributenamemapdir') . $map . '.php'; if (!file_exists($mapfile)) throw new Exception('Could not find attributemap file: ' . $mapfile); include($mapfile); diff --git a/lib/SimpleSAML/XML/MetaDataStore.php b/lib/SimpleSAML/XML/MetaDataStore.php index ecba5b02f..d5ece29f2 100644 --- a/lib/SimpleSAML/XML/MetaDataStore.php +++ b/lib/SimpleSAML/XML/MetaDataStore.php @@ -36,7 +36,7 @@ class SimpleSAML_XML_MetaDataStore { throw new Exception('Trying to load illegal set of Meta data [' . $set . ']'); } - $metadatasetfile = $this->configuration->getValue('basedir') . '/' . + $metadatasetfile = $this->configuration->getBaseDir() . '/' . $this->configuration->getValue('metadatadir') . '/' . $set . '.php'; diff --git a/www/auth/login-ldapmulti.php b/www/auth/login-ldapmulti.php index 43ac2ae66..f95b29be4 100644 --- a/www/auth/login-ldapmulti.php +++ b/www/auth/login-ldapmulti.php @@ -16,7 +16,7 @@ $metadata = new SimpleSAML_XML_MetaDataStore($config); $session = SimpleSAML_Session::getInstance(); $logger = new SimpleSAML_Logger(); -$ldapconfigfile = $config->getValue('basedir') . 'config/ldapmulti.php'; +$ldapconfigfile = $config->getBaseDir() . 'config/ldapmulti.php'; require_once($ldapconfigfile); diff --git a/www/saml2/idp/metadata.php b/www/saml2/idp/metadata.php index b99b5bb5b..c756cd672 100644 --- a/www/saml2/idp/metadata.php +++ b/www/saml2/idp/metadata.php @@ -19,7 +19,7 @@ try { $idpmeta = isset($_GET['idpentityid']) ? $_GET['idpentityid'] : $metadata->getMetaDataCurrent('saml20-idp-hosted'); $idpentityid = isset($_GET['idpentityid']) ? $_GET['idpentityid'] : $metadata->getMetaDataCurrentEntityID('saml20-idp-hosted'); - $publiccert = $config->getValue('basedir') . '/cert/' . $idpmeta['certificate']; + $publiccert = $config->getBaseDir() . '/cert/' . $idpmeta['certificate']; if (!file_exists($publiccert)) throw new Exception('Could not find certificate [' . $publiccert . '] to attach to the authentication resposne'); -- GitLab