<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>60175</bug_id>
          
          <creation_ts>2011-05-04 09:17:17 -0700</creation_ts>
          <short_desc>[Qt]http/tests/security/xss-DENIED-xsl-document.xml fails with Qt &gt;= 4.8</short_desc>
          <delta_ts>2014-02-01 19:00:03 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>79666</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Csaba Osztrogonác">ossy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ademar</cc>
    
    <cc>cmarcelo</cc>
    
    <cc>jwieczorek</cc>
    
    <cc>kling</cc>
    
    <cc>ossy</cc>
    
    <cc>robert</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>397957</commentid>
    <comment_count>0</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-05-04 09:17:17 -0700</bug_when>
    <thetext>http/tests/security/xss-DENIED-xsl-document.xml fails 
with Qt 4.8 HEAD, but passes with released Qt 4.7.2 .

--- /ramdisk/qt-linux-32-release-qt470/build/layout-test-results/http/tests/security/xss-DENIED-xsl-document-expected.txt	2011-05-04 08:28:53.690215995 -0700
+++ /ramdisk/qt-linux-32-release-qt470/build/layout-test-results/http/tests/security/xss-DENIED-xsl-document-actual.txt	2011-05-04 08:28:53.690215995 -0700
@@ -1,4 +1,4 @@
 CONSOLE MESSAGE: line 2: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Running an XSL-T 1.0 stylesheet with a 2.0 processor.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
-CONSOLE MESSAGE: line -1: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Cannot open /: Path is a directory&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+CONSOLE MESSAGE: line -1: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Protocol &amp;quot;&amp;quot; is unknown&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>399448</commentid>
    <comment_count>1</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-05-06 04:02:08 -0700</bug_when>
    <thetext>Could you guys take up this task (and https://bugs.webkit.org/show_bug.cgi?id=60176)? 

You must know much more about the differences between Qt 4.7 and Qt 4.8 than me.

4.8 bots (one for WebKit trunk, one for QtWebKit 2.2 branch )should be green to be able to catch new regressions.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401170</commentid>
    <comment_count>2</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-05-10 06:52:13 -0700</bug_when>
    <thetext>Skipped by http://trac.webkit.org/changeset/86148 and http://trac.webkit.org/changeset/86149</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>401173</commentid>
    <comment_count>3</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-05-10 06:58:48 -0700</bug_when>
    <thetext>I meant: 
http://trac.webkit.org/changeset/86148
http://trac.webkit.org/changeset/86149
http://trac.webkit.org/changeset/86150</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>405928</commentid>
    <comment_count>4</comment_count>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2011-05-18 12:10:28 -0700</bug_when>
    <thetext>No need to block qtwebkit-2.2 anymore, as XSLT is currently disabled in production branches (See bug 60824 for details).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>411365</commentid>
    <comment_count>5</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-05-27 05:46:48 -0700</bug_when>
    <thetext>Qt bug report filed about it: http://bugreports.qt.nokia.com/browse/QTBUG-19556</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>412378</commentid>
    <comment_count>6</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2011-05-30 15:09:23 -0700</bug_when>
    <thetext>*** Bug 52394 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>412380</commentid>
    <comment_count>7</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2011-05-30 15:15:18 -0700</bug_when>
    <thetext>Ends with:

ASSERT failure in QUrl QPatternist::ReportContext::resolveURI(const QUrl&amp;, const QUrl&amp;) const: &quot;The QAbstractUriResolver must return an absolute URI.&quot;, file environment/qreportcontext.cpp, line 472

See also:
https://bugs.webkit.org/show_bug.cgi?id=33423

It looks like returning a QUrl() for cross-origin requests in:


QUrl XSLTUriResolver::resolve(const QUrl&amp; relative, const QUrl&amp; baseURI) const
{
    QUrl url = baseURI.resolved(relative);

    if (!m_document-&gt;frame() || !m_document-&gt;securityOrigin()-&gt;canRequest(url))
        return QUrl();
    return url;
}

now triggers an assert in this in qreportcontext.cpp in Qt:


QUrl ReportContext::resolveURI(const QUrl &amp;relative,
                               const QUrl &amp;baseURI) const
{
    Q_ASSERT_X(!baseURI.isRelative(), Q_FUNC_INFO,
               &quot;The base URI passed from the engine wasn&apos;t absolute.&quot;);

    const QAbstractUriResolver *const resolver(uriResolver());

    if(resolver)
    {
        const QUrl final(resolver-&gt;resolve(relative, baseURI));
        Q_ASSERT_X(final.isValid() || final.isEmpty(), Q_FUNC_INFO,
                   &quot;The QAbstractUriResolver must return a valid URI.&quot;);
        Q_ASSERT_X(!final.isRelative(), Q_FUNC_INFO,
                   &quot;The QAbstractUriResolver must return an absolute URI.&quot;);
        return final;
    }
    else
        return baseURI.resolved(relative);
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>412485</commentid>
    <comment_count>8</comment_count>
    <who name="Jakub Wieczorek">jwieczorek</who>
    <bug_when>2011-05-31 00:42:24 -0700</bug_when>
    <thetext>I suspect it&apos;s a change in QUrl that&apos;s causing this assert.

Anyway, as the code is not shipping and there does not seem to be any chance the XSLT support will improve in the near future (per http://labs.qt.nokia.com/2011/05/12/qt-modules-maturity-level-the-list/, which renders the whole module &quot;Done&quot;, which means no new features as I understand it) as well as the API is not really well suited for the integration in QtWebKit (of which this bug is an example of), I suggest simply ditching this.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>437091</commentid>
    <comment_count>9</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2011-07-14 08:00:10 -0700</bug_when>
    <thetext>This bug is still valid, it wasn&apos;t fixed in http://bugreports.qt.nokia.com/browse/QTBUG-19556 ...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>541316</commentid>
    <comment_count>10</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-01-24 07:25:22 -0800</bug_when>
    <thetext>The bug is still vaild with Qt 4.8.0 and the recent Qt5 too.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>627626</commentid>
    <comment_count>11</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-05-18 06:22:49 -0700</bug_when>
    <thetext>Still valid bug with Qt 4.8 and Qt 5.

Qt 4.8 fail:
--- /home/oszi/WebKit/WebKitBuild/Release/layout-test-results/http/tests/security/xss-DENIED-xsl-document-expected.txt 
+++ /home/oszi/WebKit/WebKitBuild/Release/layout-test-results/http/tests/security/xss-DENIED-xsl-document-actual.txt 
@@ -1,4 +1,4 @@
 CONSOLE MESSAGE: line 2: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Running an XSL-T 1.0 stylesheet with a 2.0 processor.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
-CONSOLE MESSAGE: line -1: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Cannot open /: Path is a directory&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+CONSOLE MESSAGE: line -1: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Protocol &amp;quot;&amp;quot; is unknown&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600

Qt 5 fail:
--- /home/oszi/WebKit/WebKitBuild/Release/layout-test-results/http/tests/security/xss-DENIED-xsl-document-expected.txt 
+++ /home/oszi/WebKit/WebKitBuild/Release/layout-test-results/http/tests/security/xss-DENIED-xsl-document-actual.txt 
@@ -1,4 +1,4 @@
 CONSOLE MESSAGE: line 2: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Running an XSL-T 1.0 stylesheet with a 2.0 processor.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
-CONSOLE MESSAGE: line -1: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Cannot open /: Path is a directory&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
+CONSOLE MESSAGE: line -1: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Protocol &amp;quot;&amp;quot; is unknown&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
 layer at (0,0) size 800x600
   RenderView at (0,0) size 800x600</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>627628</commentid>
    <comment_count>12</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-05-18 06:26:12 -0700</bug_when>
    <thetext>Qt5 fail: (in the previous comment it was copy/paste error)

--- /mnt/raptor1/WebKit/WebKitBuild/Release/layout-test-results/http/tests/security/xss-DENIED-xsl-document-expected.txt
+++ /mnt/raptor1/WebKit/WebKitBuild/Release/layout-test-results/http/tests/security/xss-DENIED-xsl-document-actual.txt
@@ -1,4 +1,3 @@
-CONSOLE MESSAGE: line 2: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Running an XSL-T 1.0 stylesheet with a 2.0 processor.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
-CONSOLE MESSAGE: line -1: &lt;html xmlns=&apos;http://www.w3.org/1999/xhtml/&apos;&gt;&lt;body&gt;&lt;p&gt;Cannot open /: Path is a directory&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;
-layer at (0,0) size 800x600
-  RenderView at (0,0) size 800x600
+CONSOLE MESSAGE: Unsafe attempt to load URL http://localhost:8000/security/resources/target.xml from frame with URL http://127.0.0.1:8000/security/xss-DENIED-xsl-document.xml. Domains, protocols and ports must match.
+
+This test includes content via a cross-origin document() command. It passes if the load fails and thus there is no text below this line.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>737560</commentid>
    <comment_count>13</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-10-09 02:03:49 -0700</bug_when>
    <thetext>This bug is still valid.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>772781</commentid>
    <comment_count>14</comment_count>
    <who name="Csaba Osztrogonác">ossy</who>
    <bug_when>2012-11-21 03:59:12 -0800</bug_when>
    <thetext>still valid</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>