<?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>44769</bug_id>
          
          <creation_ts>2010-08-27 08:48:32 -0700</creation_ts>
          <short_desc>[Qt] Web Sockets are insecure with QtWebKit</short_desc>
          <delta_ts>2010-09-24 18:11:39 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt, QtTriaged</keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Simon Hausmann">hausmann</reporter>
          <assigned_to name="QtWebKit Unassigned">webkit-qt-unassigned</assigned_to>
          <cc>ademar</cc>
    
    <cc>commit-queue</cc>
    
    <cc>laszlo.gombos</cc>
    
    <cc>markus</cc>
    
    <cc>yael</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>270517</commentid>
    <comment_count>0</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-08-27 08:48:32 -0700</bug_when>
    <thetext>The current Socket Stream Handle implementation, in particular SocketStreamHandlePrivate::socketSslErrors() causes ssl certificate errors to be ignored.

For the QtWebKit 2.1 release we should either

    a) Disable web socket support

or 

    b) Abort the connection on ssl certificate errors.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>279019</commentid>
    <comment_count>1</comment_count>
    <who name="Yael">yael</who>
    <bug_when>2010-09-14 10:41:47 -0700</bug_when>
    <thetext>(In reply to comment #0)
&gt; The current Socket Stream Handle implementation, in particular SocketStreamHandlePrivate::socketSslErrors() causes ssl certificate errors to be ignored.
&gt; 
&gt; For the QtWebKit 2.1 release we should either
&gt; 
&gt;     a) Disable web socket support
&gt; 
&gt; or 
&gt; 
&gt;     b) Abort the connection on ssl certificate errors.

Can we abort the connection in WebKit 2.1, but not in webkit.org ?
I&apos;d like to be able to test with my Apache server, but it does not have a valid certificate :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>280270</commentid>
    <comment_count>2</comment_count>
    <who name="Simon Hausmann">hausmann</who>
    <bug_when>2010-09-16 12:22:41 -0700</bug_when>
    <thetext>(In reply to comment #1)
&gt; (In reply to comment #0)
&gt; &gt; The current Socket Stream Handle implementation, in particular SocketStreamHandlePrivate::socketSslErrors() causes ssl certificate errors to be ignored.
&gt; &gt; 
&gt; &gt; For the QtWebKit 2.1 release we should either
&gt; &gt; 
&gt; &gt;     a) Disable web socket support
&gt; &gt; 
&gt; &gt; or 
&gt; &gt; 
&gt; &gt;     b) Abort the connection on ssl certificate errors.
&gt; 
&gt; Can we abort the connection in WebKit 2.1, but not in webkit.org ?
&gt; I&apos;d like to be able to test with my Apache server, but it does not have a valid certificate :-)

Sure. Another option would be to make this behaviour depend on whether we&apos;re running in DRT mode or not.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>281273</commentid>
    <comment_count>3</comment_count>
      <attachid>68025</attachid>
    <who name="Yael">yael</who>
    <bug_when>2010-09-19 08:09:53 -0700</bug_when>
    <thetext>Created attachment 68025
Patch.

Throw an error when the websocket server certificate is not valid.
Please note that currently DRT does not test secure websocket connections, so there is no impact to current layout tests.
Once DRT gets back support for secure websocket connections, this patch will cause those tests to fail.
If ok with you, let&apos;s apply this patch only to webkit 2.1, but not to trunk. I believe that Chromium is using the same approach.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>282897</commentid>
    <comment_count>4</comment_count>
    <who name="Markus Goetz">markus</who>
    <bug_when>2010-09-22 06:23:28 -0700</bug_when>
    <thetext>The patch looks good to me.

At some point in the future we might want to forward the sslErrors signal to the user (=browser implementor) so he can handle it similar to the sslErrors signal that is coming from the QNetworkAccessManager.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>284098</commentid>
    <comment_count>5</comment_count>
    <who name="Yael">yael</who>
    <bug_when>2010-09-23 16:45:43 -0700</bug_when>
    <thetext>After talking to Laszlo today, I don&apos;t mind if this lands in the trunk.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>284105</commentid>
    <comment_count>6</comment_count>
      <attachid>68025</attachid>
    <who name="Kenneth Rohde Christiansen">kenneth</who>
    <bug_when>2010-09-23 16:52:38 -0700</bug_when>
    <thetext>Comment on attachment 68025
Patch.

LGTM, r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>284327</commentid>
    <comment_count>7</comment_count>
      <attachid>68025</attachid>
    <who name="Yael">yael</who>
    <bug_when>2010-09-24 05:31:45 -0700</bug_when>
    <thetext>Comment on attachment 68025
Patch.

Thanks, Kenneth :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>284329</commentid>
    <comment_count>8</comment_count>
      <attachid>68025</attachid>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-09-24 05:44:53 -0700</bug_when>
    <thetext>Comment on attachment 68025
Patch.

Clearing flags on attachment: 68025

Committed r68248: &lt;http://trac.webkit.org/changeset/68248&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>284330</commentid>
    <comment_count>9</comment_count>
    <who name="WebKit Commit Bot">commit-queue</who>
    <bug_when>2010-09-24 05:44:58 -0700</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>284364</commentid>
    <comment_count>10</comment_count>
    <who name="Ademar Reis">ademar</who>
    <bug_when>2010-09-24 07:17:37 -0700</bug_when>
    <thetext>Revision r68248 cherry-picked into qtwebkit-2.1 with commit a2fab5a &lt;http://gitorious.org/webkit/qtwebkit/commit/a2fab5a&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>284887</commentid>
    <comment_count>11</comment_count>
    <who name="Yael">yael</who>
    <bug_when>2010-09-24 18:11:39 -0700</bug_when>
    <thetext>*** Bug 36655 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>68025</attachid>
            <date>2010-09-19 08:09:53 -0700</date>
            <delta_ts>2010-09-24 05:44:53 -0700</delta_ts>
            <desc>Patch.</desc>
            <filename>44769.patch</filename>
            <type>text/plain</type>
            <size>1761</size>
            <attacher name="Yael">yael</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYkNvcmUvQ2hhbmdlTG9nCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIFdlYkNvcmUvQ2hhbmdlTG9n
CShyZXZpc2lvbiA2NzgxMSkKKysrIFdlYkNvcmUvQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBA
IC0xLDMgKzEsMTggQEAKKzIwMTAtMDktMTkgIFlhZWwgQWhhcm9uICA8eWFlbC5haGFyb25Abm9r
aWEuY29tPgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAg
IFtRdF0gV2ViIFNvY2tldHMgYXJlIGluc2VjdXJlIHdpdGggUXRXZWJLaXQKKyAgICAgICAgaHR0
cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTQ0NzY5CisKKyAgICAgICAgVGhy
b3cgYW4gZXJyb3Igd2hlbiB0aGUgc2VydmVyIGNlcnRpZmljYXRlIGlzIG5vdCB2YWxpZC4KKyAg
ICAgICAgRFJUIGN1cnJlbnRseSBkb2VzIG5vdCBzdXB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