mirror of
https://gitlab.archlinux.org/archlinux/aurweb.git
synced 2025-02-03 09:43:03 +00:00
Escape all output strings in the header and footer
Escape each output string using htmlspecialchars(). These aren't exploitable; it's still better to escape them properly. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de>
This commit is contained in:
parent
6f6904db3f
commit
19789c3f75
2 changed files with 4 additions and 4 deletions
|
@ -2,7 +2,7 @@
|
||||||
<!-- End of main content -->
|
<!-- End of main content -->
|
||||||
<?php
|
<?php
|
||||||
if ($ver) {
|
if ($ver) {
|
||||||
echo "<div class=\"pgbox version\">$ver</div>";
|
echo "<div class=\"pgbox version\">" . htmlspecialchars($ver) . "</div>";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xml:lang="<?php print "$LANG\" lang=\"$LANG"; ?>">
|
xml:lang="<?php print htmlspecialchars($LANG, ENT_QUOTES) ?>" lang="<?php print htmlspecialchars($LANG, ENT_QUOTES) ?>">
|
||||||
<head>
|
<head>
|
||||||
<title>AUR (<?php print htmlspecialchars($LANG); ?>)<?php if ($title != "") { print " - " . htmlspecialchars($title); } ?></title>
|
<title>AUR (<?php print htmlspecialchars($LANG); ?>)<?php if ($title != "") { print " - " . htmlspecialchars($title); } ?></title>
|
||||||
<link rel='stylesheet' type='text/css' href='css/fonts.css' />
|
<link rel='stylesheet' type='text/css' href='css/fonts.css' />
|
||||||
|
@ -52,8 +52,8 @@ reset($SUPPORTED_LANGS);
|
||||||
foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
|
foreach ($SUPPORTED_LANGS as $lang => $lang_name) {
|
||||||
print '<a href="'
|
print '<a href="'
|
||||||
. htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES)
|
. htmlspecialchars($_SERVER["PHP_SELF"], ENT_QUOTES)
|
||||||
."?setlang=$lang\" title=\"$lang_name\">"
|
."?setlang=" . htmlspecialchars($lang, ENT_QUOTES) . "\" title=\"" . htmlspecialchars($lang_name, ENT_QUOTES) . "\">"
|
||||||
. strtolower($lang) . "</a>\n";
|
. htmlspecialchars(strtolower($lang)) . "</a>\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue