Skip to content

Commit 14284c0

Browse files
authored
Sanitize request URI for GPG keys link (#1399)
1 parent ab71c2a commit 14284c0

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

include/version.inc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ function show_source_releases()
114114

115115
$SHOW_COUNT = 4;
116116

117+
$current_uri = htmlspecialchars($_SERVER['REQUEST_URI'], ENT_QUOTES, 'UTF-8');
118+
117119
$i = 0; foreach ($RELEASES as $MAJOR => $major_releases): /* major releases loop start */
118120
$releases = array_slice($major_releases, 0, $SHOW_COUNT);
119121
?>
@@ -153,7 +155,7 @@ function show_source_releases()
153155
</li>
154156
</ul>
155157

156-
<a href="<?php echo $_SERVER['REQUEST_URI']; ?>#gpg-<?php echo $mver; ?>">GPG Keys for PHP <?php echo $mver; ?></a>
158+
<a href="<?php echo $current_uri; ?>#gpg-<?php echo $mver; ?>">GPG Keys for PHP <?php echo $mver; ?></a>
157159
</div>
158160
<?php endforeach; ?>
159161
<?php endforeach; /* major releases loop end */ ?>

0 commit comments

Comments
 (0)