Revision: 3202
Author:   jaim...@gmail.com
Date:     Fri Nov 16 05:02:39 2012
Log:      Make the previous commit safe for SPs and SSP acting as a proxy.
http://code.google.com/p/simplesamlphp/source/detail?r=3202

Modified:
 /trunk/modules/authorize/templates/authorize_403.php
 /trunk/modules/authorize/www/authorize_403.php

=======================================
--- /trunk/modules/authorize/templates/authorize_403.php Fri Nov 16 02:10:36 2012 +++ /trunk/modules/authorize/templates/authorize_403.php Fri Nov 16 05:02:39 2012
@@ -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 @@
 ?>
 <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');
 ?>
=======================================
--- /trunk/modules/authorize/www/authorize_403.php      Mon Oct  5 04:03:33 2009
+++ /trunk/modules/authorize/www/authorize_403.php      Fri Nov 16 05:02:39 2012
@@ -15,6 +15,9 @@

 $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();

--
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to simplesamlphp-commits@googlegroups.com.
To unsubscribe from this group, send email to 
simplesamlphp-commits+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en.

Reply via email to