Wrong URL when triggering via web server

This plugin allows you to report an issue in MantisBT by sending an email to a particular mail account

Moderators: Developer, Contributor

Wrong URL when triggering via web server

Postby dereks » Sep 07, 2011 12:08 am

During my initial setup and testing of this plugin, I tried to manually retrieve emails using the links provided on the Manage Configuration Options page. I wanted to make sure my email delivery was working before setting up a cron job.

Also, note that I have it set to Signup new users automatically: YES.

Everything worked as expected, except that the "Welcome" email I got (for my new, automatic account registration) had a bad URL. Here is the email I got:

Code: Select all
Thank you for registering. You have an account with username
"REDACTED@domain.com". In order to complete your registration, visit the
following URL (make sure it is entered as the single line) and set your own
access password:

https://www.REDACTED.com/mantisbt/plugins/EmailReporting/scripts/verify.php?id=7&confirm_hash=02270fe69bf49a4e32a2da61af9dcecf

If you did not request any registration, ignore this message and nothing will
happen.

Do not reply to this message


Note the URL is not correct, as it links to the ./plugins/EmailReporting/scripts/ directory. Clicking on the link results in a HTTP 404 Not Found (as expected).

My Mantis Admin account also got a notification of a new user, along with the incorrect URL:

Code: Select all
The following account has been created:

Username: REDACTED@domain.com
E-mail: REDACTED@domain.com
Remote IP address: 192.168.2.10
https://www.REDACTED.com/mantisbt/plugins/EmailReporting/scripts/

Do not reply to this message


In normal use, this is not a serious problem, because the URL is correct when I use cron and the /usr/bin/php command. But as a new user of this plugin trying to get it working the first time, it was confusing for the confirmation link to be a broken URL.
dereks
 
Posts: 3
Joined: Sep 06, 2011 11:23 pm

Re: Wrong URL when triggering via web server

Postby SL-Gundam » Sep 07, 2011 9:48 am

hmmm

Their is a fix in the EmailReporting plugin for this url problem. The thing is, is that that fix is currently only applied while the cron job is running.

I adjusted the plugin (0.9.0-DEV) and now it will apply the url fix whenever necessary
SL-Gundam
 
Posts: 139
Joined: Jul 06, 2011 9:17 am


Return to EmailReporting

Who is online

Users browsing this forum: No registered users and 3 guests