Problem with the "Lost password" link on the login page

"Andrew Murphy" <amurphy-LGuGoN7bAtFWk0Htik3J/[email protected]>
Newsgroups gmane.comp.bug-tracking.mantis.general
Message-ID <[email protected]>
Hello. :)

I posted about this problem on the Mantis Bug Tracker forums, and it was
suggested that I should post it here instead.


Here's what the problem is:  When a user visits login_page.php, if they are
not logged in and click on the "Lost your password?" or the "Signup for a
new account" links instead of being sent to the appropriate page, the
login_page.php refreshes with a different URL. For example:
http://blahblah.com/mantis/login_page.php?return=/mantis/lost_pwd_page.php

However if the user -is- logged in and visits the login_page.php and clicks
on one of these links they are shown the right page.

I'm sure there must be something mis-configured somewhere but after poking
around in the code I've not been able to puzzle it out. (My knowledge of PHP
is pretty rudimentary.)


Mantis version: 1.0.3

config_inc.php (note, I've put in underscores in place of sensitive data):
<?php
$g_hostname = '__________';
$g_db_type = 'mysql';
$g_database_name = '_________';
$g_db_username = '_________';
$g_db_password = '__________';

# insert SVN integration
$g_source_control_account = 'svn';
$g_source_control_regexp = '/\b(?:bug|issue)\s*[#]{0,1}(\d+)\b/i';



#############################
# Mantis Email Settings
#############################

# --- email variables -------------
$g_administrator_email	= '_____________';
$g_webmaster_email	 = '_____________';

# the 'From: ' field in emails
$g_from_email	 = '______________';

# the return address for bounced mail
$g_return_path_email	= '______________';

# allow email notification
# note that if this is disabled, sign-up and password reset messages will
# not be sent.
$g_enable_email_notification	= ON;

# select the method to mail by:
# 0 - mail()
# 1 - sendmail
# 2 - SMTP
$g_phpMailer_method	 = 2;

# This option allows you to use a remote SMTP host. Must use the phpMailer
script
# Name of smtp host, needed for phpMailer, taken from php.ini
$g_smtp_host	 = '____________';

# These options allow you to use SMTP Authentication when you use a remote
# SMTP host with phpMailer. If smtp_username is not '' then the username
# and password will be used when logging in to the SMTP server.
$g_smtp_username = '_________';
$g_smtp_password = '_________';




#############################
# Mantis Version String
#############################

# --- version variables -----------
$g_show_version	 = OFF;


###############################
# Mantis Display Settings
###############################

# --- sitewide variables ----------
$g_window_title	 = '_____________';	 # browser window title

# --- advanced views --------------
# BOTH, SIMPLE_ONLY, ADVANCED_ONLY
$g_show_report	 = SIMPLE_ONLY;
$g_show_update	 = SIMPLE_ONLY;
$g_show_view	 = SIMPLE_ONLY;

# --- Position of the status colour legend, can be: STATUS_LEGEND_POSITION_*
# --- see constant_inc.php. (*: BOTTOM or TOP)
$g_status_legend_position	= STATUS_LEGEND_POSITION_TOP;

# --- Position of the filter box, can be: FILTER_POSITION_*
# FILTER_POSITION_TOP, FILTER_POSITION_BOTTOM, or 0 for none.
$g_filter_position	= FILTER_POSITION_BOTTOM;


############################
# Mantis Date Settings
############################

# --- date format settings --------
# date format strings (default is 'US' formatting)
# go to http://www.php.net/manual/en/function.date.php
# for detailed instructions on date formatting
$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';

################################
# Mantis Look and Feel Variables
################################

# --- status color codes ----------
#
$g_status_colors	 = array( 'new'	 => '#f4b0b4',
'advice'	 => '#f7c992',
'assigned'	 => '#f2ef97',
'resolved'	 => '#bcd75c',
'closed'	 => '#acace5');


###########################
# Include files
###########################

# Specify your top/bottom include file (logos, banners, etc)
# if a top file is supplied, the default Mantis logo at the top will be
hidden
$g_bottom_include_page	 = '______________';
$g_top_include_page	 = '_____________';
# CSS file
$g_css_include_file	 = '______________';


##########
# Icons
##########

# Icon associative arrays
# Status to icon mapping
$g_status_icon_arr = array (
NONE => '',
LOW => '_____________',
NORMAL => '',
HIGH => '________________',
URGENT => '_________________',
IMMEDIATE => '________________'
);


#######################################
# Mantis Filter Variables
#######################################
$g_filter_by_custom_fields = OFF;
$g_filter_custom_fields_per_row = 5;
$g_view_filters = SIMPLE_ONLY;

# This switch enables the use of xmlhttprequest protocol to speed up the
filter display.
# Rather than launching a separate page, the filters are updated in-line in
the
# view_all_bugs_page.
$g_dhtml_filters = OFF;


############################
# Status Settings
############################

# Status to assign to the bug when submitted.
$g_bug_submit_status = NEW_;

# Status to assign to the bug when assigned.
$g_bug_assigned_status = ASSIGNED;

# Status to assign to the bug when reopened.
$g_bug_reopen_status = FEEDBACK;

# Resolution to assign to the bug when reopened.
$g_bug_reopen_resolution = REOPENED;

# --- status thresholds (*_status_threshold) ---

# Bug becomes readonly if its status is >= this status. The bug becomes
read/write again if re-opened and its
# status becomes less than this threshold.
$g_bug_readonly_status_threshold = RESOLVED;

# Bug is resolved, ready to be closed or reopened. In some custom
installations a bug
# maybe considered as resolved when it is moved to a custom (FIXED OR
TESTED) status.
$g_bug_resolved_status_threshold = RESOLVED;

# Automatically set status to ASSIGNED whenever a bug is assigned to a
person.
# This is useful for installations where assigned status is to be used when
# the bug is in progress, rather than just put in a person's queue.
$g_auto_set_status_to_assigned	= ON;

# 'status_enum_workflow' defines the workflow, and reflects a simple
# 2-dimensional matrix. For each existing status, you define which
# statuses you can go to from that status, e.g. from NEW_ you might list
statuses
# '10:new,20:feedback,30:acknowledged' but not higher ones.
/* This is the original workflow - AndrewM */
//	$g_status_enum_workflow = array();
/* This is my workflow - AndrewM */
$g_status_enum_workflow[NEW_]='20:advice,50:assigned,80:resolved,90:closed';
$g_status_enum_workflow[FEEDBACK] ='50:assigned,80:resolved,90:closed';
$g_status_enum_workflow[ASSIGNED] ='20:advice,80:resolved,90:closed';
$g_status_enum_workflow[RESOLVED] ='20:advice,50:assigned,90:closed';
$g_status_enum_workflow[CLOSED] ='20:advice,50:assigned,80:resolved';


###########################
# Mantis Enum Strings
###########################

# --- enum strings ----------------
# status from $g_status_index-1 to 79 are used for the onboard customization
(if enabled)
# directly use Mantis to edit them.
$g_status_enum_string	 =
'10:new,20:advice,50:assigned,80:resolved,90:closed';


######################
# Bug Relationships
######################

# Enable support for bug relationships where a bug can be a related,
dependent on, or duplicate of another.
# See relationship_api.php for more details.
$g_enable_relationship = OFF;


############################
# Mantis Misc Settings
############################

# --- access level thresholds (*_threshold) ---

# --- Threshold needed to show the list of users montoring a bug on the bug
view pages.
$g_show_monitor_list_threshold = NOBODY;

# access level needed to monitor bugs
# Look in the constant_inc.php file if you want to set a different value
$g_monitor_bug_threshold = NOBODY;

# Add profile threshold
$g_add_profile_threshold = NOBODY;

# Threshold needed to be able to create and modify global profiles
$g_manage_global_profile_threshold = NOBODY;

# threshold for viewing changelog
$g_view_changelog_threshold = NOBODY;


###############################
# Mantis Reminder Settings
###############################

# are reminders stored as bugnotes
$g_store_reminders	 = ON;

# Automatically add recipients of reminders to monitor list, if they are not
# the handler or the reporter (since they automatically get notified, if
required)
# If recipients of the reminders are below the monitor threshold, they will
not be added.
$g_reminder_recipents_monitor_bug = OFF;


##################
# Custom Fields
##################

# Threshold needed to manage custom fields
$g_manage_custom_fields_threshold = NOBODY;

# Threshold needed to link/unlink custom field to/from a project
$g_custom_field_link_threshold = NOBODY;

# Whether to start editng a custom field immediately after creating it
$g_custom_field_edit_after_create = OFF;


################################
# Mantis Language Settings
################################

# --- language settings -----------

# If the language is set to 'auto', the actual
# language is determined by the user agent (web browser)
# language preference.
$g_default_language	 = 'english';

# list the choices that the users are allowed to choose
$g_language_choices_arr	= array(
'english'
);

# Browser language mapping for 'auto' language selection
$g_language_auto_map = array(
'en-us, en-gb, en-au, en' => 'english',
'zh-cn, zh-sg, zh' => 'english',
'zh-hk, zh-tw' => 'english',
'cs' => 'english',
'da' => 'english',
'nl-be, nl' => 'english',
'et' => 'english',
'fi' => 'english',
'fr-be, fr-ca, fr-ch, fr' => 'english',
'de-de, de-at, de-ch, de' => 'english',
'hu' => 'english',
'it-ch, it' => 'english',
'ja' => 'english',
'ko' => 'english',
'lt' => 'english',
'no' => 'english',
'pl' => 'english',
'pt-br' => 'english',
'pt' => 'english',
'ro-mo, ro' => 'english',
'ru-mo, ru' => 'english',
'sr' => 'english',
'sk' => 'english',
'sl' => 'english',
'es-mx, es-co, es-ar, es-cl, es-pr, es' => 'english',
'sv-fi, sv' => 'english',
'tr' => 'english'
);

# Fallback for automatic language selection
$g_fallback_language	= 'english';


##################
# My View Settings
##################
# Default page after Login or Set Project
$g_default_home_page = 'view_all_bug_page.php';


#############################
# Mantis Email Settings
#############################

# --- email variables -------------
$g_administrator_email	= '____________';
$g_webmaster_email	 = '____________';

# the 'From: ' field in emails
$g_from_email	 = '_____________';

# the return address for bounced mail
$g_return_path_email	= '_____________';


##################################
# Mantis Default Preferences
##################################

# --- account pref defaults -------
$g_default_advanced_report	 = OFF;
$g_default_advanced_view	 = OFF;
$g_default_advanced_update	 = OFF;
$g_default_refresh_delay	 = 30; # in minutes
$g_default_redirect_delay	 = 2; # in seconds
$g_default_bugnote_order	 = 'DESC';
$g_default_email_on_new	 = OFF;
$g_default_email_on_assigned	= ON;
$g_default_email_on_feedback	= ON;
$g_default_email_on_resolved	= OFF;
$g_default_email_on_closed	 = OFF;
$g_default_email_on_reopened	= OFF;
$g_default_email_on_bugnote	 = OFF;
$g_default_email_on_status	 = 0; # @@@ Unused
$g_default_email_on_priority	= 0; # @@@ Unused
$g_default_email_on_new_minimum_severity	 = OFF; # 'any'
$g_default_email_on_assigned_minimum_severity	= OFF; # 'any'
$g_default_email_on_feedback_minimum_severity	= OFF; # 'any'
$g_default_email_on_resolved_minimum_severity	= OFF; # 'any'
$g_default_email_on_closed_minimum_severity	 = OFF; # 'any'
$g_default_email_on_reopened_minimum_severity	= OFF; # 'any'
$g_default_email_on_bugnote_minimum_severity	= OFF; # 'any'
$g_default_email_on_status_minimum_severity	 = OFF; # 'any'
$g_default_email_on_priority_minimum_severity	= OFF; # @@@ Unused
$g_default_email_bugnote_limit	 = 0;
# default_language - is set to site language

?>



 ------------------------------
Andrew Murphy
Interactive Media Developer
amurphy-LGuGoN7bAtFWk0Htik3J/[email protected]

Delvinia
370 King Street West, 5th Floor, Box 4 
Toronto Canada M5V 1J9
P (416) 364-1455 ext. 232
F (416) 364-9830  
W www.delvinia.com



------------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.