modules now control if uid may end with '$' or not
This commit is contained in:
parent
f6e01592a7
commit
a7e7f3fc38
|
@ -160,7 +160,7 @@ for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if (! $_GET['norefresh']) {
|
if (! $_GET['norefresh']) {
|
||||||
// configure search filter
|
// configure search filter
|
||||||
$module_filter = get_ldap_filter("host"); // basic filter is provided by modules
|
$module_filter = get_ldap_filter("host"); // basic filter is provided by modules
|
||||||
$filter = "(&(uid=*$)" . $module_filter; // hosts end with "$"
|
$filter = "(&" . $module_filter;
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])]))
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])]))
|
||||||
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
||||||
|
|
|
@ -194,7 +194,7 @@ for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
|
|
||||||
// configure search filter for LDAP
|
// configure search filter for LDAP
|
||||||
$module_filter = get_ldap_filter("user"); // basic filter is provided by modules
|
$module_filter = get_ldap_filter("user"); // basic filter is provided by modules
|
||||||
$filter = "(&(!(uid=*$))" . $module_filter; // users do not end with "$"
|
$filter = "(&" . $module_filter; // users do not end with "$"
|
||||||
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
for ($k = 0; $k < sizeof($desc_array); $k++) {
|
||||||
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])]))
|
if (eregi("^([0-9a-z_\\*\\+\\-])+$", $_POST["filter" . strtolower($attr_array[$k])]))
|
||||||
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
$filter = $filter . "(" . strtolower($attr_array[$k]) . "=" .
|
||||||
|
|
Loading…
Reference in New Issue