diff --git a/docs/source/simplesamlphp-sp.xml b/docs/source/simplesamlphp-sp.xml index 35a05fa867af86dfd98b9928eac481504f29ab54..ad82586a9c321c10dca996fd76388bd6904e7312 100644 --- a/docs/source/simplesamlphp-sp.xml +++ b/docs/source/simplesamlphp-sp.xml @@ -7,7 +7,7 @@ <articleinfo> <date>2007-10-15</date> - <pubdate>Fri Feb 1 08:44:40 2008</pubdate> + <pubdate>Wed Feb 6 14:26:51 2008</pubdate> <author> <firstname>Andreas Ă…kre</firstname> diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php index 822a97ddd96708ef6d49ea3e8b294680ecc8d4ca..068428bb9a27990e567f27a4c744f039ee64943c 100644 --- a/lib/SimpleSAML/Utilities.php +++ b/lib/SimpleSAML/Utilities.php @@ -25,19 +25,19 @@ class SimpleSAML_Utilities { return $currenthost; } + public static function getSelfProtocol() { + $s = empty($_SERVER["HTTPS"]) ? '' + : ($_SERVER["HTTPS"] == "on") ? "s" + : ""; + $protocol = self::strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; + return $protocol; + } public static function selfURLhost() { $currenthost = self::getSelfHost(); - $s = empty($_SERVER["HTTPS"]) ? '' - : ($_SERVER["HTTPS"] == "on") ? "s" - : ""; - $protocol = self::strleft(strtolower($_SERVER["SERVER_PROTOCOL"]), "/").$s; - - $port = ($_SERVER["SERVER_PORT"] == "80") ? "" - : (":".$_SERVER["SERVER_PORT"]); - + $protocol = self::getSelfProtocol(); $portnumber = $_SERVER["SERVER_PORT"]; $port = ':' . $portnumber; @@ -51,6 +51,8 @@ class SimpleSAML_Utilities { return $protocol."://" . $currenthost . $port; } + + public static function selfURLNoQuery() { diff --git a/templates/default/en/frontpage.php b/templates/default/en/frontpage.php index a4279a02ec0ec0f402579a88ff691b6032586e45..bc2ff455f0f07b67985086985fc75c55d54ecbbd 100644 --- a/templates/default/en/frontpage.php +++ b/templates/default/en/frontpage.php @@ -11,12 +11,24 @@ <ul> <?php - foreach ($data['links'] AS $link) { + foreach ($this->data['links'] AS $link) { echo '<li><a href="' . htmlspecialchars($link['href']) . '">' . htmlspecialchars($link['text']) . '</a></li>'; } ?> </ul> </p> + <?php + + foreach($this->data['warnings'] AS $warning) { + + + echo '<div class="caution">' . $warning . '</div>'; + + + + } + + ?> diff --git a/www/index.php b/www/index.php index 449e72ec23d40bd9ea1d2c124f9fbf4f95045f85..9f756764eabf47f043839c63b07faa3566fd02a2 100644 --- a/www/index.php +++ b/www/index.php @@ -2,14 +2,12 @@ require_once('_include.php'); - require_once('SimpleSAML/Utilities.php'); require_once('SimpleSAML/Session.php'); require_once('SimpleSAML/XHTML/Template.php'); require_once('SimpleSAML/Metadata/MetaDataStorageHandler.php'); - /* Load simpleSAMLphp, configuration */ $config = SimpleSAML_Configuration::getInstance(); $session = SimpleSAML_Session::getInstance(true); @@ -24,32 +22,55 @@ if ($config->getValue('admin.protectindexpage', false)) { } +$warnings = array(); + +if (SimpleSAML_Utilities::getSelfProtocol() != 'https') { + $warnings[] = '<strong>You are not using HTTPS</strong> - encrypted communication with the user. Using simpleSAMLphp will works perfectly fine on HTTP for test purposes, but if you will be using simpleSAMLphp in a production environment, you should be running it on HTTPS.'; +} + + + $links = array(); -$links[] = array('href' => 'admin/metadata.php', 'text' => 'Meta data overview for your installation. Diagnose your meta data files.'); +$links[] = array( + 'href' => 'admin/metadata.php', + 'text' => 'Meta data overview for your installation. Diagnose your meta data files.'); if ($config->getValue('enable.saml20-sp') === true) - $links[] = array('href' => 'saml2/sp/metadata.php', 'text' => 'SAML 2.0 Service Provider Metadata (automatically generated)'); + $links[] = array( + 'href' => 'saml2/sp/metadata.php', + 'text' => 'SAML 2.0 Service Provider Metadata (automatically generated)'); if ($config->getValue('enable.saml20-sp') === true) - $links[] = array('href' => 'example-simple/saml2-example.php', 'text' => 'SAML 2.0 SP example - test logging in through your IdP'); + $links[] = array( + 'href' => 'example-simple/saml2-example.php', + 'text' => 'SAML 2.0 SP example - test logging in through your IdP'); if ($config->getValue('enable.saml20-idp') === true) - $links[] = array('href' => 'saml2/idp/metadata.php', 'text' => 'SAML 2.0 Identity Provider Metadata (automatically generated)'); + $links[] = array( + 'href' => 'saml2/idp/metadata.php', + 'text' => 'SAML 2.0 Identity Provider Metadata (automatically generated)'); if ($config->getValue('enable.shib13-sp') === true) - $links[] = array('href' => 'example-simple/shib13-example.php', 'text' => 'Shibboleth 1.3 SP example - test logging in through your Shib IdP'); + $links[] = array( + 'href' => 'example-simple/shib13-example.php', + 'text' => 'Shibboleth 1.3 SP example - test logging in through your Shib IdP'); if ($config->getValue('enable.openid-provider') === true) - $links[] = array('href' => 'openid/provider/server.php', 'text' => 'OpenID Provider site - Alpha version (test code)'); + $links[] = array( + 'href' => 'openid/provider/server.php', + 'text' => 'OpenID Provider site - Alpha version (test code)'); -$links[] = array('href' => 'example-simple/hostnames.php', 'text' => 'Diagnostics on hostname, port and protocol'); +$links[] = array( + 'href' => 'example-simple/hostnames.php', + 'text' => 'Diagnostics on hostname, port and protocol'); $t = new SimpleSAML_XHTML_Template($config, 'frontpage.php'); $t->data['header'] = 'simpleSAMLphp installation page'; $t->data['icon'] = 'compass_l.png'; +$t->data['warnings'] = $warnings; $t->data['links'] = $links; $t->show(); diff --git a/www/resources/default.css b/www/resources/default.css index f6830d909964db154c2f12bed845e6f464527ffc..e82beee1529aef14245d49f893944a69ad43b615 100644 --- a/www/resources/default.css +++ b/www/resources/default.css @@ -90,4 +90,13 @@ dl dd { padding: .4em; font-family: monospace; font-size: large; +} +div.caution { + background-color: #FF9; + background-image: url('icons/caution.png'); + background-repeat: no-repeat; + + border: thin solid #444; + padding: .2em .2em .2em 60px; + margin: 1em 0px 1em 0p; } \ No newline at end of file diff --git a/www/resources/icons/caution.png b/www/resources/icons/caution.png new file mode 100755 index 0000000000000000000000000000000000000000..e3897db8771158c562faec8dfa675633ba677007 Binary files /dev/null and b/www/resources/icons/caution.png differ