Skip to content
Snippets Groups Projects
Commit 4aca3882 authored by Jaime Pérez Crespo's avatar Jaime Pérez Crespo
Browse files

Make the previous commit safe for SPs and SSP acting as a proxy.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3202 44740490-163a-0410-bde0-09ae8108e29a
parent 627e9917
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,6 @@
* @version $Id$
*/
global $state;
$this->data['403_header'] = $this->t('{authorize:Authorize:403_header}');
$this->data['403_text'] = $this->t('{authorize:Authorize:403_text}');
......@@ -19,7 +18,13 @@ $this->includeAtTemplateBase('includes/header.php');
?>
<h1><?php echo $this->data['403_header']; ?></h1>
<p><?php echo $this->data['403_text']; ?></p>
<p><a href="<?php echo SimpleSAML_Module::getModuleURL('core/authenticate.php', array('as' => $state['Source']['auth']))."&logout"; ?>"><?php echo $this->t('{status:logout}'); ?></a></p>
<?php
if (isset($this->data['LogoutURL'])) {
?>
<p><a href="<?php echo htmlspecialchars($this->data['LogoutURL']); ?>"><?php echo $this->t('{status:logout}'); ?></a></p>
<?php
}
?>
<?php
$this->includeAtTemplateBase('includes/footer.php');
?>
......@@ -15,6 +15,9 @@ $state = SimpleSAML_Auth_State::loadState($id, 'authorize:Authorize');
$globalConfig = SimpleSAML_Configuration::getInstance();
$t = new SimpleSAML_XHTML_Template($globalConfig, 'authorize:authorize_403.php');
if (isset($state['Source']['auth'])) {
$t->data['LogoutURL'] = SimpleSAML_Module::getModuleURL('core/authenticate.php', array('as' => $state['Source']['auth']))."&logout";
}
header('HTTP/1.0 403 Forbidden');
$t->show();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment