Advertisement
Guest User

Untitled

a guest
Apr 10th, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. This is a hack. Unfortunately I could not find a description of how to put MantisBT behind Apache with NTLM auth.
  2.  
  3. Set authentication to BASIC_AUTH.
  4.  
  5. ``core/authentication_api.php`` - comment out lines 289-291 to disable password check:
  6.  
  7. ```php
  8. // if( !auth_does_password_match( $t_user_id, $p_password ) ) {
  9. // user_increment_failed_login_count( $t_user_id );
  10. // return false;
  11. // }
  12. ```
  13.  
  14. ``login.php`` line 60 - force user name to remote user and provide some password string:
  15.  
  16. ```php
  17. $f_username = $_SERVER['REMOTE_USER']; //auth_prepare_username( $f_username );
  18. $f_password = 'some_password'; //auth_prepare_password( $f_password );
  19. ```
  20.  
  21. ``index.php`` line 39 - change ``login_page.php`` to ``login.php``:
  22.  
  23. ```php
  24. print_header_redirect( 'login.php' );
  25. ```
  26.  
  27. ``layout_api.php`` - comment out lines 505 and 508:
  28.  
  29. ```php
  30. // echo '<li class="divider"></li>';
  31.  
  32. # Logout
  33. // layout_navbar_menu_item( helper_mantis_url( 'logout_page.php' ), lang_get( 'logout_link' ), 'fa-sign-out' );
  34. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement