com web/php: Fix XSS reported by Francisco Alonso @ Red Hat Product Security: include/site.inc
| From: | Paul Dragoonis | Date: | Thu, 04 Sep 2014 21:27:04 +0000 |
| Subject: | com web/php: Fix XSS reported by Francisco Alonso @ Red Hat Product Security: include/site.inc | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-21884@lists.php.net to get a copy of this message | ||
Commit: 90f6ab91ac7870eee1d0edda8c6a8b29b1e30aee
Author: Hannes Magnusson <bjori@mongodb.com> Thu, 4 Sep 2014 14:27:04 -0700
Parents: 068173b018b1b33ddb5723aa2bdb24fa38164edb
Branches: master
Link: http://git.php.net/?p=web/php.git;a=commitdiff;h=90f6ab91ac7870eee1d0edda8c6a8b29b1e30aee
Log:
Fix XSS reported by Francisco Alonso @ Red Hat Product Security
Changed paths:
M include/site.inc
Diff:
diff --git a/include/site.inc b/include/site.inc
index 508fd62..4dc8d22 100644
--- a/include/site.inc
+++ b/include/site.inc
@@ -256,7 +256,7 @@ function print_mirror_box($countryname, $countrycode, $mirrors, $file = null, $d
}
?>
<div class="entry">
- <div class="url"><a href="<?php echo $url; ?>"
title="<?php echo clean($mirror['url']); ?>"><?php echo
clean($urltitle); ?></a></div>
+ <div class="url"><a href="<?php echo htmlentities($url,
ENT_QUOTES | ENT_IGNORE, 'UTF-8'); ?>" title="<?php echo
clean($mirror['url']); ?>"><?php echo clean($urltitle);
?></a></div>
<div class="provider"><a href="<?php echo
$mirror['provider_url']; ?>" title="<?php echo
clean($mirror['provider_title']); ?>"><?php echo
clean($mirror['provider_title']); ?></a></div>
</div>
<?php endforeach; ?>