Bug 202445 - incorrect http-url detection, query part ending too soon
Summary: incorrect http-url detection, query part ending too soon
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: OpenSUSE Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-03 22:37 UTC by Jens Herden
Modified: 2009-08-24 23:22 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jens Herden 2009-08-03 22:37:41 UTC
Version:            (using KDE 4.2.98)
OS:                Linux
Installed from:    SuSE RPMs

KMail tries to detect Url's inside of mail bodies and make them clickable. 

There is an error in parsing the query part of an HTTP url. I found this while working with Typo3, there you find the character "[" and "]" inside of the query part. E.g.:

http://localhost/index.php?id=7&tx_srfeuserregister_pi1[rU]=350&tx_srfeuserregister_pi1[cmd]=setfixed

Unfortunately KMail only detects the Url until the "[" character. 

RFC 3986 says:

>3.4. Query
>   The query component contains non-hierarchical data that, along with
>   data in the path component (Section 3.3), serves to identify a
>   resource within the scope of the URI's scheme and naming authority
>   (if any).  The query component is indicated by the first question
>   mark ("?") character and terminated by a number sign ("#") character
>   or by the end of the URI.

So almost everything is legal inside the query part.

A similar bug, already closed, is BUG 81281

I would be happy if you could change the detection behavior to become compatible to RFC 3986.

Thanks Jens
Comment 1 Martin Koller 2009-08-24 23:19:05 UTC
SVN commit 1015195 by mkoller:

BUG: 202445

Try much better to discover a URL, even if it is enclosed with
some sort of brackets/quotes and even interrupted by line breaks or white space.
RFC3986 explains this in appendix C


 M  +42 -17    linklocator.cpp  
 M  +68 -2     tests/testlinklocator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1015195
Comment 2 Martin Koller 2009-08-24 23:22:36 UTC
SVN commit 1015198 by mkoller:

Backport r1015195 by mkoller from trunk to the 4.3 branch:

CCBUG: 202445

Try much better to discover a URL, even if it is enclosed with
some sort of brackets/quotes and even interrupted by line breaks or white space.
RFC3986 explains this in appendix C



 M  +42 -17    linklocator.cpp  
 M  +68 -2     tests/testlinklocator.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1015198