Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff -uNr mantisbt-1.2.0rc2/config_inc.php mantis/config_inc.php
- --- mantisbt-1.2.0rc2/config_inc.php 1969-12-31 19:00:00.000000000 -0500
- +++ mantis/config_inc.php 2009-12-13 10:09:55.000000000 -0500
- @@ -0,0 +1,42 @@
- +<?php
- + $g_hostname = 'localhost';
- + $g_db_type = 'mysql';
- + $g_database_name = 'bugtracker';
- + $g_db_username = 'root';
- + $g_db_password = 'patoaventuras';
- +
- + $g_allow_signup = OFF; // Don't allow users to signup for new accounts
- +
- + $g_administrator_email = 'jackbauer@0x8c.com';
- + $g_webmaster_email = 'jackbauer@0x8c.com';
- + $g_from_email = 'jackbauer@0x8c.com';
- +
- + $g_default_language = 'english';
- +
- + $g_window_title = '0x8c boøgtRaCK3r';
- +
- +// $g_status_legend_position = STATUS_LEGEND_POSITION_TOP;
- +
- + $g_wait_time = 1;
- +
- + $g_short_date_format = 'd-m-Y';
- + $g_normal_date_format = 'd-m-Y H:i';
- + $g_complete_date_format = 'd-m-Y H:i T';
- +
- + $g_allowed_files = '';
- + $g_disallowed_files = 'php,exe,pl';
- +
- + /*
- + $g_bottom_include_page If this page eixsts it will be displayed at the bottom of every page. It makes a good company branding include page.
- + $g_top_include_page If this page eixsts it will be displayed at the top of every page. It makes a good company branding include page.
- + $g_css_include_file Set this to point to the CSS file of your choice.
- + */
- +
- + $g_allow_anonymous_login = OFF;
- + $g_enable_project_documentation = OFF;
- + $g_allow_account_delete = OFF;
- +
- + $g_login_method = BASIC_AUTH;
- +
- + $g_default_new_account_access_level = ADMINISTRATOR;
- +?>
- diff -uNr mantisbt-1.2.0rc2/core/authentication_api.php mantis/core/authentication_api.php
- --- mantisbt-1.2.0rc2/core/authentication_api.php 2009-10-06 16:18:41.000000000 -0500
- +++ mantis/core/authentication_api.php 2009-12-13 10:05:40.000000000 -0500
- @@ -191,7 +191,9 @@
- if ( $t_auto_create ) {
- # attempt to create the user
- - $t_cookie_string = user_create( $p_username, $p_password );
- + $t_cookie_string = user_create( $p_username, auth_generate_random_password('jackbauer@0x8c.com'),
- + $p_username . '@0x8c.com');
- + // [VANILLA] $t_cookie_string = user_create( $p_username, $p_password );
- if ( false === $t_cookie_string ) {
- # it didn't work
- @@ -225,12 +227,13 @@
- if( !user_is_anonymous( $t_user_id ) ) {
- # anonymous login didn't work, so check the password
- - if( !auth_does_password_match( $t_user_id, $p_password ) ) {
- +// [VANILLA] if( !auth_does_password_match( $t_user_id, $p_password ) ) {
- + if(BASIC_AUTH != $t_login_method && !auth_does_password_match( $t_user_id, $p_password ) ) {
- user_increment_failed_login_count( $t_user_id );
- return false;
- }
- }
- -
- +
- # ok, we're good to login now
- # increment login count
- user_increment_login_count( $t_user_id );
- diff -uNr mantisbt-1.2.0rc2/.htaccess mantis/.htaccess
- --- mantisbt-1.2.0rc2/.htaccess 1969-12-31 19:00:00.000000000 -0500
- +++ mantis/.htaccess 2009-12-13 10:39:25.000000000 -0500
- @@ -0,0 +1,4 @@
- +AuthShadow on
- +AuthType Basic
- +AuthName "mantis secured area v2"
- +Require group 0x8c
- diff -uNr mantisbt-1.2.0rc2/index.php mantis/index.php
- --- mantisbt-1.2.0rc2/index.php 2009-06-23 13:42:02.000000000 -0500
- +++ mantis/index.php 2009-12-13 08:53:16.000000000 -0500
- @@ -27,6 +27,8 @@
- if ( auth_is_user_authenticated() ) {
- print_header_redirect( config_get( 'default_home_page' ) );
- +} else if (BASIC_AUTH == config_get('login_method')) {
- + print_header_redirect( 'login.php' );
- } else {
- print_header_redirect( 'login_page.php' );
- }
- diff -uNr mantisbt-1.2.0rc2/login_page.php mantis/login_page.php
- --- mantisbt-1.2.0rc2/login_page.php 2009-10-06 16:18:41.000000000 -0500
- +++ mantis/login_page.php 2009-12-13 10:13:45.000000000 -0500
- @@ -31,6 +31,10 @@
- if ( auth_is_user_authenticated() && !current_user_is_anonymous() ) {
- print_header_redirect( config_get( 'default_home_page' ) );
- }
- +
- + if (BASIC_AUTH == config_get('login_method')) {
- + print_header_redirect( 'login.php' );
- + }
- $f_error = gpc_get_bool( 'error' );
- $f_cookie_error = gpc_get_bool( 'cookie_error' );
- diff -uNr mantisbt-1.2.0rc2/login.php mantis/login.php
- --- mantisbt-1.2.0rc2/login.php 2009-06-23 13:42:09.000000000 -0500
- +++ mantis/login.php 2009-12-13 09:56:39.000000000 -0500
- @@ -25,7 +25,7 @@
- * MantisBT Core API's
- */
- require_once( 'core.php' );
- -
- +
- $f_username = gpc_get_string( 'username', '' );
- $f_password = gpc_get_string( 'password', '' );
- $f_perm_login = gpc_get_bool( 'perm_login' );
- diff -uNr mantisbt-1.2.0rc2/logout_page.php mantis/logout_page.php
- --- mantisbt-1.2.0rc2/logout_page.php 2009-06-23 13:42:02.000000000 -0500
- +++ mantis/logout_page.php 2009-12-13 09:50:25.000000000 -0500
- @@ -26,5 +26,9 @@
- require_once( 'core.php' );
- auth_logout();
- +
- + if ( BASIC_AUTH == config_get('login_method') ) {
- + print_header_redirect( 'index.php' );
- + }
- print_header_redirect( config_get( 'logout_redirect_page' ), /* die */ true, /* sanitize */ false );
Add Comment
Please, Sign In to add comment