View Issue Details

IDProjectCategoryView StatusLast Update
0004765mantisbtotherpublic2004-12-11 03:02
Reportergrangeway Assigned Tograngeway  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Fixed in Version0.19.2 
Summary0004765: url detection issue
Description

since the changes to detecting urls between 0.19, and CVS HEAD, the following is no longer detected as correctly as url's:

http://127.0.0.1/
http://127.0.0.1/
http://127.0.0.1/foo.php
http://127.0.0.1/test.php

TagsNo tags attached.

Relationships

related to 0004764 closedgrangeway Url detection issue 
child of 0004818 closedvboctor Mantis 0.19.2 release 

Activities

grangeway

grangeway

2004-11-06 12:34

reporter   ~0008256

The mantisLink code was originally checked in to fix url's containing a bracket from including the bracket in the URL.

As the class seems to have a number of issues, I'm checking in an improved regex which seems to work on 'test' collection of URLs that I've assembled here reasonably well. And at least for my testcases, scores higher then the new code.

Note: code in question is that in 1.59 of string_api.php

The following Issues prevent the new code from being useable imo:

  1. The regex needs improving i.e. doesn't match localhost
  2. Having it 'truncate' long url's is fine for a web app, but not a bugtracking app where you might want to illustrate say, an xss vuln in the message.
  3. The main issue -> the fact that if you have multiple links to the same domain, depending on the sorting/order of those links, you get incorrect results e.g. http://www.microsoft.com/index.html could be displayed as <a>www.microsoft.com</a>index.html, if there is already a previous entry for www.microsoft.com.