#229 unable to login due to error in auth_ldap.inc file

Major
closed
John Beranek
MRBS (194)
5
2015-02-27
2012-01-03
Vidura
No

Hi there,

I downloaded the latest version of MRBS (1.4.8) but was unable to login to the Active Directory using correct login credentials.

I looked through the auth_ldap.inc file and noticed the the $count variable was NULL when the following line of code is evaluated:
$all_ldap_opts[$item] = array_fill(0, $count, $$item);

I placed the following line on top of the foreach loop to solve this issue : if (!$count) { $count=1; }

So the affected code block looks like this now:

if (!$count) {$count=1;}
// Turn any non-array config items into arrays in $all_ldap_opts
foreach ($config_items as $item)
{

if (!isset($$item))
{
  continue;
}
if (!is_array($$item))
{
  $all_ldap_opts[$item] = array_fill(0, $count, $$item);
}

}

I have uploaded the updated auth_ldap.inc for you perusal.

Kind Regards,
Vidura

Discussion

  • Vidura
    Vidura
    2012-01-03

     
    Attachments
  • dwpoon
    dwpoon
    2012-03-08

    The NEWS file says for MRBS 1.4.8:

    Revamped the LDAP authentication scheme somewhat. You can now
    specify most of the configuration parameters as arrays, so that
    you can have multiple servers or multiple base DNs that are
    configured in different ways.

    What it neglected to say was that the configuration file now requires you to specify
    $ldap_host = array('hostname.example.org');
    where it was previously acceptable to just say
    $ldap_host = 'hostname.example.org';

    Either that, or your patch should have been incorporated to avoid the incompatibility.

     
  • John Beranek
    John Beranek
    2012-08-01

    The fix was added after the MRBS 1.4.8 release, unfortunately, in [r2249], which has not yet made it into a release.

    • assigned_to: John Beranek
     

    Related

    Commit: [r2249]

  • John Beranek
    John Beranek
    2015-02-27

    This is fixed in a released MRBS version

     
  • John Beranek
    John Beranek
    2015-02-27

    • status: open --> closed
     


Anonymous


Cancel   Add attachments