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

Post Reply
dereks
Posts: 3
Joined: 07 Sep 2011, 04:23

Wrong URL when triggering via web server

Post by dereks »

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.
SL-Gundam
Posts: 722
Joined: 06 Jul 2011, 14:17

Re: Wrong URL when triggering via web server

Post by SL-Gundam »

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
Post Reply