This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 5942 - Crash when a URI path contains some invalid characters
Summary: Crash when a URI path contains some invalid characters
Status: RESOLVED FIXED
Alias: None
Product: mobileOK Basic checker
Classification: Unclassified
Component: Java Library (show other bugs)
Version: unspecified
Hardware: PC Linux
: P2 minor
Target Milestone: ---
Assignee: Abel Rionda
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-08-07 17:20 UTC by fd
Modified: 2008-09-25 09:43 UTC (History)
0 users

See Also:


Attachments

Description fd 2008-08-07 17:20:22 UTC
Description
-----------
A page that contains an image whose URI contains invalid character may crash the checker. In particular, the presence of the characters "[" and "]" (which are not allowed in the path part of a URI as defined in RFC3986) trigger the crash.

The crash occurs because the XSLT function resolve-uri expects its parameters to be valid.


Example
-------
An image that defines:
 <img src="/test[gen-delim]" alt="test" width="2" height="3" />
(the width and height must be defined otherwise the check is not performed...)

raises the following exception:

Error on line 112 of file:/home/fdaoust/w3c/DEV/2007/mobileok-ref/build/org/w3c/mwi/mobileok/basic/xslt/functions.xsl:
  FORG0002: Base URI {http://localhost:8001/mobileok...} is invalid: Illegal character in
  path at index 5: /test[sub-delim
Exception in thread "main" org.w3c.mwi.mobileok.basic.TestException: ImagesSpecifySizeTest
Comment 1 Abel Rionda 2008-09-25 09:43:00 UTC
We replaced iri-to-uri function with encode-for-uri since this last one seems to be more complete.