View Issue Details

IDProjectCategoryView StatusLast Update
0020303mantisbtldappublic2015-12-15 13:07
Reporterhelfgott Assigned Toatrol  
PriorityhighSeveritycrashReproducibilityalways
Status closedResolutionno change required 
PlatformLinux OSDebian GNU/Linux 7 
Summary0020303: Accounts don't get created when using LDAP for login
Description

#} else if ( LDAP == $t_login_method && ldap_authenticate_by_username( $p_username, $p_password ) ) {
} if ( LDAP == $t_login_method && ldap_authenticate_by_username( $p_username, $p_password ) ) {

TagsNo tags attached.

Activities

helfgott

helfgott

2015-11-23 12:21

reporter   ~0051918

The else if doesn't allow the accounts to be created.

Mantis version: mantisbt-1.2.19
Linux: Debian 7 (wheezy)

Modifying this line in line 187:

mantis/core/authentication_api.php

Works for me.

Here are my settings in config_inc.php:

$g_ldap_server = 'ldap://myserver.company:389';
$g_ldap_root_dn = 'ou=Users,dc=company';
$g_ldap_uid_field = 'uid';
$g_ldap_realname_field = 'cn';
$g_ldap_bind_dn = 'cn=admin,dc=company';
$g_ldap_bind_passwd = '***';
$g_use_ldap_email = ON;
$g_use_ldap_realname = ON;
$g_ldap_protocol_version = 3;
$g_ldap_follow_referrals = ON;
$g_ldap_simulation_file_path = '';
$g_ldap_organization = '';

helfgott

helfgott

2015-11-23 12:31

reporter   ~0051919

please change the ticket resumen to be more descriptive.

atrol

atrol

2015-11-23 15:29

developer   ~0051922

Last edited: 2015-11-23 15:29

At first sight this looks like a bug in PHP.
It's hard to believe that there is such a serious bug in the PHP version that comes with Debian (I assume you are using PHP 5.4.4)

Can you confirm, that you use the original PHP 5.4.4 that comes with Debian?

Maybe there was just a temporary problem with your LDAP server when you encountered the problem.
Please double check that you can reproduce the issue when undoing your changes.

helfgott

helfgott

2015-11-23 17:18

reporter   ~0051923

I didn't have installed the php-ldap module. So i enabled the Wheezy repo and installed it for this.

Since i've used the wheezy repo you can be sure i obtained php5 from there.

I've seen this before with "else if" when writting some scripts in debian.

Tomorrow at my arrival i'll check the version of php and post it here.

helfgott

helfgott

2015-11-23 17:19

reporter   ~0051924

Btw, i'll try to make an test environment to check it, just to be sure.

helfgott

helfgott

2015-11-23 20:26

reporter   ~0051925

{CLIENT} root@host.client: ~ #> php5 --version
PHP 5.4.45-0+deb7u2 (cli) (built: Oct 17 2015 08:26:31)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

-->
what i did:

deb http://security.debian.org/ wheezy/updates main contrib non-free
apt-get update
apt-get install php5-ldap

atrol

atrol

2015-11-24 02:45

developer   ~0051928

Are you able to provide a small PHP script that is independant from Mantis which reproduces the "else if" issue?

helfgott

helfgott

2015-11-24 05:28

reporter   ~0051932

i'm unable to, that was long time ago, i should say "i'm almost sure about seeing it".

Actually i'm installing a new environment just to be sure of this "bug".

helfgott

helfgott

2015-11-24 05:43

reporter   ~0051933

well... in the meanwhile i got back into the server trying to reproduce it like yesterday and isn't happening today (maybe due a server error as you said?) i think this can be closed since now it is working even with the original line.

thanks.

atrol

atrol

2015-11-24 06:19

developer   ~0051937

Thanks for the feedback.
Feel free to reopen if you finally find that there is a bug in Mantis.