Encode auth server name before display.

This commit is contained in:
jim-p 2015-09-04 10:10:32 -04:00
parent 38f147d667
commit 64c50ecd23
5 changed files with 7 additions and 7 deletions

View File

@ -99,7 +99,7 @@ include("head.inc");
if ($auth_server['name'] == $pconfig['authmode'])
$selected = "selected=\"selected\"";
?>
<option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option>
<option value="<?=htmlspecialchars($auth_server['name']);?>" <?=$selected;?>><?=htmlspecialchars($auth_server['name']);?></option>
<?php endforeach; ?>
</select>
</td>

View File

@ -152,7 +152,7 @@ include("head.inc");
if (!isset($pconfig['authmode']) && $auth_server['name'] == "Local Database")
$selected = "selected=\"selected\"";
?>
<option value="<?=$auth_server['name'];?>" <?=$selected;?>><?=$auth_server['name'];?></option>
<option value="<?=htmlspecialchars($auth_server['name']);?>" <?=$selected;?>><?=htmlspecialchars($auth_server['name']);?></option>
<?php
endforeach;
?>

View File

@ -88,15 +88,15 @@ if (!$authcfg) {
echo "<table width='100%'>";
echo "<tr><td>" . gettext("Attempting connection to") . " " . "<td><center>$auth_server</b></center></td>";
echo "<tr><td>" . gettext("Attempting connection to") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>";
if(ldap_test_connection($authcfg)) {
echo "<td><center><font color=green>OK</center></td></tr>";
echo "<tr><td>" . gettext("Attempting bind to") . " " . "<td><center>$auth_server</b></center></td>";
echo "<tr><td>" . gettext("Attempting bind to") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>";
if(ldap_test_bind($authcfg)) {
echo "<td><center><font color=green>OK</center></td></tr>";
echo "<tr><td>" . gettext("Attempting to fetch Organizational Units from") . " " . "<td><center>$auth_server</b></center></td>";
echo "<tr><td>" . gettext("Attempting to fetch Organizational Units from") . " " . "<td><center>" . htmlspecialchars($auth_server). "</b></center></td>";
$ous = ldap_get_user_ous(true, $authcfg);
if(count($ous)>1) {
echo "<td><center><font color=green>OK</center></td></tr>";

View File

@ -393,7 +393,7 @@ function login_banner_change() {
$selected = "";
if (in_array($auth_server['name'], $authmodes))
$selected = "selected=\"selected\"";
echo "<option value='{$auth_server['name']}' {$selected}>{$auth_server['name']}</option>\n";
echo "<option value=\"" . htmlspecialchars($auth_server['name']). "\" {$selected}>" . htmlspecialchars($auth_server['name']). "</option>\n";
}
?>
</select>

View File

@ -810,7 +810,7 @@ if ($savemsg)
if (in_array($auth_server_key, $authmodes))
$selected = "selected=\"selected\"";
?>
<option value="<?=$auth_server_key;?>" <?=$selected;?>><?=$auth_server['name'];?></option>
<option value="<?=htmlspecialchars($auth_server_key);?>" <?=$selected;?>><?=htmlspecialchars($auth_server['name']);?></option>
<?php endforeach; ?>
</select>
</td>