Skip to content

Commit

Permalink
Fix: 0007733: when using LDAP auth blank page upon login if LDAP exte…
Browse files Browse the repository at this point in the history
…nsion not loaded

git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@4459 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
mantis committed Jul 21, 2007
1 parent fed4d36 commit 7052a96
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions core/constant_inc.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: constant_inc.php,v 1.67 2007-07-11 03:18:13 vboctor Exp $
# $Id: constant_inc.php,v 1.68 2007-07-21 13:38:26 prichards Exp $
# --------------------------------------------------------

### CONSTANTS ###
Expand Down Expand Up @@ -256,7 +256,8 @@
define( 'ERROR_LDAP_SERVER_CONNECT_FAILED', 1401 );
define( 'ERROR_LDAP_UPDATE_FAILED', 1402 );
define( 'ERROR_LDAP_USER_NOT_FOUND', 1403 );

define( 'ERROR_LDAP_EXTENSION_NOT_LOADED', 1404 );

# ERROR_CATEGORY_*
define( 'ERROR_CATEGORY_DUPLICATE', 1500 );
define( 'ERROR_CATEGORY_NO_ACTION', 1501 );
Expand Down
6 changes: 5 additions & 1 deletion core/ldap_api.php
Expand Up @@ -6,7 +6,7 @@
# See the README and LICENSE files for details

# --------------------------------------------------------
# $Id: ldap_api.php,v 1.19 2006-04-22 01:52:14 vboctor Exp $
# $Id: ldap_api.php,v 1.20 2007-07-21 13:38:26 prichards Exp $
# --------------------------------------------------------

###########################################################################
Expand All @@ -19,6 +19,10 @@ function ldap_connect_bind( $p_binddn = '', $p_password = '' ) {
$t_ldap_server = config_get( 'ldap_server' );
$t_ldap_port = config_get( 'ldap_port' );

if (!extension_loaded('ldap')) {
trigger_error(ERROR_LDAP_EXTENSION_NOT_LOADED,ERROR);
}

$t_ds = @ldap_connect ( $t_ldap_server, $t_ldap_port );
if ( $t_ds > 0 ) {
$t_protocol_version = config_get( 'ldap_protocol_version' );
Expand Down
9 changes: 5 additions & 4 deletions lang/strings_english.txt
Expand Up @@ -11,11 +11,11 @@
###########################################################################
# English strings for Mantis (source language for translations)
# -------------------------------------------------
# $Revision: 1.303 $
# $Author: giallu $
# $Date: 2007-07-16 08:23:42 $
# $Revision: 1.304 $
# $Author: prichards $
# $Date: 2007-07-21 13:38:30 $
#
# $Id: strings_english.txt,v 1.303 2007-07-16 08:23:42 giallu Exp $
# $Id: strings_english.txt,v 1.304 2007-07-21 13:38:30 prichards Exp $
###########################################################################

?>
Expand Down Expand Up @@ -240,6 +240,7 @@ $MANTIS_ERROR[ERROR_LDAP_AUTH_FAILED] = 'LDAP Authentication Failed';
$MANTIS_ERROR[ERROR_LDAP_SERVER_CONNECT_FAILED] = 'LDAP Server Connection Failed';
$MANTIS_ERROR[ERROR_LDAP_UPDATE_FAILED] = 'LDAP Record Update has failed.';
$MANTIS_ERROR[ERROR_LDAP_USER_NOT_FOUND] = 'LDAP User Record Not Found.';
$MANTIS_ERROR[ERROR_LDAP_EXTENSION_NOT_LOADED] = 'LDAP Extension Not Loaded.';
$MANTIS_ERROR[ERROR_DB_CONNECT_FAILED] = 'Database connection failed. Error received from database was #%d: %s';
$MANTIS_ERROR[ERROR_DB_QUERY_FAILED] = 'Database query failed. Error received from database was #%d: %s for the query: %s';
$MANTIS_ERROR[ERROR_DB_SELECT_FAILED] = 'Database selection failed. Error received from database was #%d: %s';
Expand Down

0 comments on commit 7052a96

Please sign in to comment.