summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_authservers.php
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2013-07-17 10:13:08 -0400
committerjim-p <jimp@pfsense.org>2013-07-17 10:13:08 -0400
commita5cd1c5a4286062b84caf32df860f2e2f2e204aa (patch)
tree8fc7c7a478b757eff9fce5f67e4ce3083042dd4c /usr/local/www/system_authservers.php
parent2cb760dae2fa2214240bb0083b060966be548604 (diff)
downloadpfsense-a5cd1c5a4286062b84caf32df860f2e2f2e204aa.zip
pfsense-a5cd1c5a4286062b84caf32df860f2e2f2e204aa.tar.gz
Add LDAP server options to control UTF8-encoding of parameters. Fixes #2227. While I'm here, add a checkbox to prevent the stripping of @ from the LDAP username if the user wants the full name transmitted.
Diffstat (limited to 'usr/local/www/system_authservers.php')
-rw-r--r--usr/local/www/system_authservers.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/usr/local/www/system_authservers.php b/usr/local/www/system_authservers.php
index 9ed49a9..2984d8c 100644
--- a/usr/local/www/system_authservers.php
+++ b/usr/local/www/system_authservers.php
@@ -107,6 +107,8 @@ if ($act == "edit") {
$pconfig['ldap_attr_user'] = $a_server[$id]['ldap_attr_user'];
$pconfig['ldap_attr_group'] = $a_server[$id]['ldap_attr_group'];
$pconfig['ldap_attr_member'] = $a_server[$id]['ldap_attr_member'];
+ $pconfig['ldap_utf8'] = isset($a_server[$id]['ldap_utf8']);
+ $pconfig['ldap_nostrip_at'] = isset($a_server[$id]['ldap_nostrip_at']);
if (!$pconfig['ldap_binddn'] || !$pconfig['ldap_bindpw'])
$pconfig['ldap_anon'] = true;
@@ -247,6 +249,15 @@ if ($_POST) {
$server['ldap_attr_user'] = $pconfig['ldap_attr_user'];
$server['ldap_attr_group'] = $pconfig['ldap_attr_group'];
$server['ldap_attr_member'] = $pconfig['ldap_attr_member'];
+ if ($pconfig['ldap_utf8'] == "yes")
+ $server['ldap_utf8'] = true;
+ else
+ unset($server['ldap_utf8']);
+ if ($pconfig['ldap_nostrip_at'] == "yes")
+ $server['ldap_nostrip_at'] = true;
+ else
+ unset($server['ldap_nostrip_at']);
+
if (!$pconfig['ldap_anon']) {
$server['ldap_binddn'] = $pconfig['ldap_binddn'];
@@ -680,6 +691,36 @@ function select_clicked() {
<input name="ldap_attr_member" type="text" class="formfld unknown" id="ldap_attr_member" size="20" value="<?=htmlspecialchars($pconfig['ldap_attr_member']);?>"/>
</td>
</tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("UTF8 Encode");?></td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="0" cellpadding="2" summary="utf8 encoding">
+ <tr>
+ <td>
+ <input name="ldap_utf8" type="checkbox" id="ldap_utf8" value="yes" <?php if ($pconfig['ldap_utf8']) echo "checked=\"checked\""; ?> />
+ </td>
+ <td>
+ <?=gettext("UTF8 encode LDAP parameters before sending them to the server. Required to support international characters, but may not be supported by every LDAP server.");?>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td width="22%" valign="top" class="vncell"><?=gettext("Username Alterations");?></td>
+ <td width="78%" class="vtable">
+ <table border="0" cellspacing="0" cellpadding="2" summary="username alterations">
+ <tr>
+ <td>
+ <input name="ldap_nostrip_at" type="checkbox" id="ldap_nostrip_at" value="yes" <?php if ($pconfig['ldap_nostrip_at']) echo "checked=\"checked\""; ?> />
+ </td>
+ <td>
+ <?=gettext("Do not strip away parts of the username after the @ symbol, e.g. user@host becomes user when unchecked.");?>
+ </td>
+ </tr>
+ </table>
+ </td>
+ </tr>
</table>
<table width="100%" border="0" cellpadding="6" cellspacing="0" id="radius" style="display:none" summary="">
OpenPOWER on IntegriCloud