From 88e1f09d8357c8142cadf97bd2e9ac165ba0ec5c Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Thu, 29 Jul 2010 10:42:01 +0000
Subject: [PATCH] metaedit: Fix cross-site scripting.

metaedit fails to validate the userid. If a malicious user is able to
make another user log in as that user id, he will be able to run scripts
in the domain of the site.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2442 44740490-163a-0410-bde0-09ae8108e29a
---
 modules/metaedit/templates/metalist.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/metaedit/templates/metalist.php b/modules/metaedit/templates/metalist.php
index 2886189ff..368fe7838 100644
--- a/modules/metaedit/templates/metalist.php
+++ b/modules/metaedit/templates/metalist.php
@@ -13,7 +13,7 @@ $this->includeAtTemplateBase('includes/header.php');
 
 echo('<h1>Metadata Registry</h1>');
 
-echo('<p>Here you can register new SAML entities. You are successfully logged in as ' . $this->data['userid'] . '</p>');
+echo('<p>Here you can register new SAML entities. You are successfully logged in as ' . htmlspecialchars($this->data['userid']) . '</p>');
 
 echo('<h2>Your entries</h2>');
 echo('<table class="metalist" style="width: 100%">');
-- 
GitLab