View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0010944 | mantisbt | ldap | public | 2009-09-15 08:31 | 2012-10-27 09:21 |
Reporter | dhx | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | N/A |
Status | closed | Resolution | duplicate | ||
Summary | 0010944: ldap_get_field_from_username does not properly check return value from ldap_get_entries | ||||
Description | Important lines from ldap_get_field_from_username: $t_info = ldap_get_entries( $t_ds, $t_sr ); A few things. count( $t_info ) == 0... is this ever true? The PHP documentation of the ldap_get_entries function seems to indicate that the 'count' key is always returned in the array. In other words, $t_info['count'] is always defined in the result and therefore count($t_info) is always at least 1? We then don't check if $p_field is a valid attribute in the result and even if it is, it seems that multiple (or no values) may be returned for each attribute? Kirill reported on IRC an error within this function: Which seems to agree with our lack of checking that attributes/values do actually exist within the returned results? | ||||
Tags | No tags attached. | ||||
The following forum post may have a repro of the wrong error handling. It seems that system warnings show up when an invalid user is queried. |
|
I think this is the same problem I posted in 0010230 and analysed in 0010230:0021146 . I.e., given
you need to test like
Regarding the email entry I proposed in 0010230:0021171 :
|
|
I think this is related to, and possibly duplicate of 0012960 |
|
Since 0012960 was resolved, I think this one should be as well. |
|
I'm going to leave this to @dhx as the reporter of this issue. |
|
@dhx, can you please confirm this is indeed resolved by 0012960 as I think it is ? |
|
dhx since you have not provided any feedback on this, I assume you agree with my assessment that it's a duplicate of 0012960. |
|