Skip to content

Instantly share code, notes, and snippets.

@pvlasov
Last active March 2, 2018 23:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pvlasov/1dc90f3c9507237b00ca9b2ebc627c8a to your computer and use it in GitHub Desktop.
Save pvlasov/1dc90f3c9507237b00ca9b2ebc627c8a to your computer and use it in GitHub Desktop.
Setting MantisBT behind Apache with NTML

This is a hack. Unfortunately I could not find a description of how to put MantisBT behind Apache with NTLM auth.

Set authentication to BASIC_AUTH in config/config_inc.php:

$g_login_method           = BASIC_AUTH;

core/authentication_api.php - comment out lines 289-291 to disable password check:

//		if( !auth_does_password_match( $t_user_id, $p_password ) ) {
//			user_increment_failed_login_count( $t_user_id );
//			return false;
//		}

login.php line 60 - force user name to remote user and provide some password string:

$f_username = $_SERVER['REMOTE_USER']; //auth_prepare_username( $f_username );
$f_password = 'some_password'; //auth_prepare_password( $f_password );

Rename login_page.php to login_page.php.bak and copy login.php to login_page.php.

layout_api.php - comment out lines 505 and 508:

//	echo '<li class="divider"></li>';

	# Logout
//	layout_navbar_menu_item( helper_mantis_url( 'logout_page.php' ), lang_get( 'logout_link' ), 'fa-sign-out' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment