Re: [hybi] Question about Sec-WebSocket-Accept paragraph

Ian Fette (イアンフェッティ) <ifette@google.com> Thu, 16 June 2011 16:50 UTC

Return-Path: <ifette@google.com>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 402129E8004 for <hybi@ietfa.amsl.com>; Thu, 16 Jun 2011 09:50:31 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -105.49
X-Spam-Level:
X-Spam-Status: No, score=-105.49 tagged_above=-999 required=5 tests=[AWL=0.186, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jkBwjMszXCMC for <hybi@ietfa.amsl.com>; Thu, 16 Jun 2011 09:50:30 -0700 (PDT)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by ietfa.amsl.com (Postfix) with ESMTP id 5E6DE11E811B for <hybi@ietf.org>; Thu, 16 Jun 2011 09:50:30 -0700 (PDT)
Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id p5GGoTqW028341 for <hybi@ietf.org>; Thu, 16 Jun 2011 09:50:29 -0700
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1308243029; bh=yk7bKnB/YJtCLWMFiBmzpAKmjCw=; h=MIME-Version:Reply-To:In-Reply-To:References:Date:Message-ID: Subject:From:To:Cc:Content-Type; b=McHY0/wXzEPXRTdyEpUnSN9tlPpUJW7Ord/SqvR4sqN8ntwdp3hut7W4S3F7sPTkf sV4rpEqxByi/54d4B8cLQ==
Received: from iwn9 (iwn9.prod.google.com [10.241.68.73]) by wpaz21.hot.corp.google.com with ESMTP id p5GGnk6K002420 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for <hybi@ietf.org>; Thu, 16 Jun 2011 09:50:28 -0700
Received: by iwn9 with SMTP id 9so1612470iwn.37 for <hybi@ietf.org>; Thu, 16 Jun 2011 09:50:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=0DCF4duyoUTv0RoCA+IlTI7X3vEuN6yp5Yxm8zqjnzs=; b=nQUdN6nXUKhHiXT3cCyEbsafj+tanWhXCR2NRyftyx7F/xSgXu/ArSyAK6qUinOED7 IDh1PX/GxF9saSbz1qCA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=WV1ebeP+Pr6tF9s0p/lx4ouPhlUiuqUmA65I4e+PoCYfDumbLTWv/JN8FuEdV+JUVU ovy/PfMwxnAaXjDZ/EdA==
MIME-Version: 1.0
Received: by 10.231.41.69 with SMTP id n5mr1007828ibe.83.1308243028421; Thu, 16 Jun 2011 09:50:28 -0700 (PDT)
Received: by 10.231.33.8 with HTTP; Thu, 16 Jun 2011 09:50:28 -0700 (PDT)
In-Reply-To: <BANLkTinYPmc9FgMRN10zCupu5XUyEeUSSg@mail.gmail.com>
References: <BANLkTinYPmc9FgMRN10zCupu5XUyEeUSSg@mail.gmail.com>
Date: Thu, 16 Jun 2011 09:50:28 -0700
Message-ID: <BANLkTikf+p+PLAkfOo6rYsHNN62AHFZaxA@mail.gmail.com>
From: "Ian Fette (イアンフェッティ)" <ifette@google.com>
To: Joel Martin <hybi@martintribe.org>
Content-Type: multipart/alternative; boundary="0015177407d4fd2b1b04a5d71059"
X-System-Of-Record: true
Cc: hybi@ietf.org
Subject: Re: [hybi] Question about Sec-WebSocket-Accept paragraph
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
Reply-To: ifette@google.com
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Jun 2011 16:50:31 -0000

I just replied on your other post...

On Thu, Jun 16, 2011 at 8:56 AM, Joel Martin <hybi@martintribe.org> wrote:

> Sorry for the bogus subject in the previous post.
>
> On Thu, Jun 16, 2011 at 10:54 AM, Joel Martin <hybi@martintribe.org>wrote:
>
>> I started to try and answer this StackOverflow question about the protocol
>> text and realized that I didn't understand it as well as I thought:
>>
>> http://stackoverflow.com/questions/6372252/why-does-the-server-in-a-websocket-request-have-to-answer-a-challenge
>>
>> The question is related to this paragraph (which has been in the drafts
>> for a while unchanged):
>>
>>     Finally, the server has to prove to the client that it received the
>>     client's WebSocket handshake, so that the server doesn't accept
>>     connections that are not WebSocket connections.  This prevents an
>>     attacker from tricking a WebSocket server by sending it carefully-
>>     crafted packets using |XMLHttpRequest| or a |form| submission.
>>
>> I can see how the Sec-WebSocket-Accept would prevent a WebSocket client
>> from being tricked into connecting to a non-WebSocket server. However, I'm
>> having difficulty understanding how the Sec-WebSocket-Accept header would
>> prevent a XMLHttpRequest from succeeding to a WebSockets server since it is
>> sent from the server. I am aware of the prohibition against "Sec-" headers
>> in the client to server direction. Is there a requirement that
>> XMLHttpRequest responses with unrecognized "Sec-" headers be rejected by
>> user agents (and if so does this only apply in the browser case)?
>>
>> It's likely I just don't have enough context to understand the paragraph,
>> but perhaps it could be clarified a bit.
>>
>> Regards,
>>
>> Joel Martin
>>
>
>
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi
>
>