Skip to content
Snippets Groups Projects
Commit 0d56e4ef authored by Olav Morken's avatar Olav Morken
Browse files

Error page: Fix cross-site scripting.

If the users email-address comes from an untrusted source, it can be
used to inject arbitrary HTML into the error pages.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2432 44740490-163a-0410-bde0-09ae8108e29a
parent 577d6dc2
No related branches found
No related tags found
No related merge requests found
...@@ -47,7 +47,7 @@ if (isset($this->data['errorReportAddress'])) { ...@@ -47,7 +47,7 @@ if (isset($this->data['errorReportAddress'])) {
<form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post"> <form action="<?php echo htmlspecialchars($this->data['errorReportAddress']); ?>" method="post">
<p><?php echo $this->t('report_text'); ?></p> <p><?php echo $this->t('report_text'); ?></p>
<p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="<?php echo($this->data['email']); ?>" /> <p><?php echo $this->t('report_email'); ?> <input type="text" size="25" name="email" value="<?php echo htmlspecialchars($this->data['email']); ?>" />
<p> <p>
<textarea style="width: 300px; height: 100px" name="text"><?php echo $this->t('report_explain'); ?></textarea> <textarea style="width: 300px; height: 100px" name="text"><?php echo $this->t('report_explain'); ?></textarea>
......
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