View Issue Details

IDProjectCategoryView StatusLast Update
0012092mantisbtapi soappublic2010-07-29 10:45
Reporterdominik Assigned Tojreese  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.2.1 
Fixed in Version1.2.2 
Summary0012092: Wrong URL in E-Mail notifications by changes via webservice
Description

When adding an issue via webservice, the email notification has the wrong url. Same problem was already fixed in 0008604 but seems to reappear again.

The path seems to be recognized wrong:

"normal" use

$g_path = 'https://www.server.org/mantis/';

"SOAP" use

$g_path = 'https://www.server.org/mantis/api/soap/';

I think the following lines from config_defaults_inc.php are responsible for that:

$t_path = str_replace( basename( $_SERVER['PHP_SELF'] ), '', $_SERVER['PHP_SELF'] );
$t_url = $t_protocol . '://' . $t_host . $t_path;

Additional Information

--sip--
The following issue has been SUBMITTED.

https://www.server.org/mantis/api/soap/view.php?id=40 [^]
--/snip--

TagsNo tags attached.

Activities

dominik

dominik

2010-06-18 11:21

reporter   ~0025905

In my case a

$t_path = str_replace( basename( $_SERVER['PHP_SELF'] ), '', $_SERVER['PHP_SELF'] );
$t_path = str_replace( '/api/soap', '', $t_path );
$t_url = $t_protocol . '://' . $t_host . $t_path;

did the trick (at least as far as I can see)...

thraxisp

thraxisp

2010-06-18 11:51

reporter   ~0025910

This is also the case if you access Mantis via different addresses (e.g., inside/outside DMZ or via an ssh tunnel). I see things like http://localhost:10180/mantis/view.php?id=3305 in notifications in this case.

It may be useful to have the address presented in notifications be a fixed one, rather than calculating it.

The same issue occurs in the old source code integration as well.

dominik

dominik

2010-06-22 18:17

reporter   ~0025951

Confirmation: patch resolved problem for me

jreese

jreese

2010-07-02 13:47

reporter   ~0026017

Fix committed to 1.2.x and master branches.

Related Changesets

MantisBT: master 00e60da3

2010-06-21 14:00

jreese


Details Diff
Fix 0012092: Detect SOAP API in url sniffing Affected Issues
0012092
mod - config_defaults_inc.php Diff File

MantisBT: master-1.2.x cf7f557f

2010-06-21 14:00

jreese


Details Diff
Fix 0012092: Detect SOAP API in url sniffing Affected Issues
0012092
mod - config_defaults_inc.php Diff File