Re: Call for Adoption: draft-reschke-rfc54987bis

Julian Reschke <julian.reschke@gmx.de> Wed, 01 April 2015 19:48 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 7A20E1A8ACC for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 1 Apr 2015 12:48:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.912
X-Spam-Level:
X-Spam-Status: No, score=-6.912 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, RCVD_IN_DNSWL_HI=-5, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0Kut9Ica6NTY for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Wed, 1 Apr 2015 12:48:41 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 03D7D1A8AA0 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Wed, 1 Apr 2015 12:48:41 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1YdOa5-0001gv-S3 for ietf-http-wg-dist@listhub.w3.org; Wed, 01 Apr 2015 19:45:41 +0000
Resent-Date: Wed, 01 Apr 2015 19:45:41 +0000
Resent-Message-Id: <E1YdOa5-0001gv-S3@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.80) (envelope-from <julian.reschke@gmx.de>) id 1YdOa3-0001fm-6z for ietf-http-wg@listhub.w3.org; Wed, 01 Apr 2015 19:45:39 +0000
Received: from mout.gmx.net ([212.227.17.21]) by lisa.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <julian.reschke@gmx.de>) id 1YdOa2-0007Tg-1z for ietf-http-wg@w3.org; Wed, 01 Apr 2015 19:45:38 +0000
Received: from [192.168.1.8] ([95.93.109.146]) by mail.gmx.com (mrgmx101) with ESMTPSA (Nemesis) id 0MV1wf-1YwLgY2KoX-00YRV3; Wed, 01 Apr 2015 21:44:47 +0200
Message-ID: <551C4AAD.60505@gmx.de>
Date: Wed, 01 Apr 2015 21:44:45 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0
MIME-Version: 1.0
To: Willy Tarreau <w@1wt.eu>
CC: Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>
References: <1C7436D4-D1EF-454C-BC14-E8C00165AA2E@mnot.net> <20150331054245.GB7069@1wt.eu> <551BA8A3.2030505@gmx.de> <20150401191930.GB8013@1wt.eu>
In-Reply-To: <20150401191930.GB8013@1wt.eu>
Content-Type: text/plain; charset="windows-1252"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:0V85+SDevb+WdFazO85I3oyYI3Wia9+nuuZ9qpDAd5ftn7+elBL ywkMx1odhUW3dqcUJFIUIPGx3XRwg+MWXbjOVFHkR7hchO68/FHe1+ddGeTPOnyVtADpHnV mSerz28c9hQvU4BZAA18N4l6kKayvjh+Ihiw8mO4P7b4kLJsz55ytC8L7GpRNllcCsfZY37 9BNkSs2IlYKCK2/PpGidg==
X-UI-Out-Filterresults: notjunk:1;
Received-SPF: pass client-ip=212.227.17.21; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-7.0
X-W3C-Hub-Spam-Report: FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_IRR=-3, W3C_WL=-1
X-W3C-Scan-Sig: lisa.w3.org 1YdOa2-0007Tg-1z 28fbfe9ca0506021726d1c5e4c27e3ce
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Call for Adoption: draft-reschke-rfc54987bis
Archived-At: <http://www.w3.org/mid/551C4AAD.60505@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/29192
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On 2015-04-01 21:19, Willy Tarreau wrote:
> On Wed, Apr 01, 2015 at 10:13:23AM +0200, Julian Reschke wrote:
>> On 2015-03-31 07:42, Willy Tarreau wrote:
>>> After a quick review, I think we should make it stricter. Currently,
>>> it suggests that recipients should be prepared to receive invalid code
>>> sequences but that can be dangerous when passing through multiple
>>> intermediaries because all of them could have different fallback
>>> methods. I'd rather make it clear that any recipient in the chain
>>> which finds an encoding issue must return a 400 bad req.
>>
>> a) It's not the case right now. How do you want to get this change
>> deployed in practice?
>
> Just like we said that multiple content-length values are not acceptable
> if different despite most implementations not doing the check yet. I mean,
> by not specifying the control, we can leave the hole open.

I don't think that there *is* a hole.

>> b) How do you want to signal an error on a *response*?
>
> Good point. In haproxy we return a 502 bad gateway when the server
> returns something unparsable. Only the client receives it and (in
> rare occasions) reports it.

For Content-Disposition, this would likely break things that "work" 
today (for some value of "work").

>>> Also, I'd prefer to make it explicitly forbidden to %-encode US-ASCII
>>> characters because this could be used to bypass some WAFs for example :
>>> if it is detected that a server implements this standard and is able
>>> to %-decode some attributes in header fields, and a WAF in the middle
>>> does not, the client can abuse the %-encoding to try to hide some
>>> activities.
>>
>> Yes, that's the case right now. I'd argue that the spec has been out for
>> ages, so the intermediary ought to be fixed.
>
> I had never heard about %-encoding in header fields to be honnest,
> and I don't know which servers or intermediaries decode them given
> that unless I'm mistaken, "%" is a valid character in a header field
> and doesn't imply %-encoding.

You may want to re-read the spec. It only applies to specific parameter 
names ending in "*".

>>> In addition to this, probably that we should make it clear that some
>>> characters must not be emitted nor encoded (NUL, CR, LF). The risk is
>>> that some intermediaries decode them and replace them before passing
>>> the request to the next hop and change the message header structure,
>>> resulting in issues similar to HTTP request smugling attacks.
>>
>> I think that depends on the header field it is used in.
>
> That can become delicate.

It doesn't seem to be a problem today.

>> For instance,
>> RFC 6266 discusses these constraints for the filename parameter.
>
> Indeed, I wasn't aware of this. And it uses the same syntax as in
> your proposal.

It uses the encoding defined in RFC 5987, and that's the spec we would 
be revising here.

>>> Otherwise I think it could be useful indeed.
>>
>> It already is, and has been for a long time.
>
> It's just that I never heard about this.
>
> I really think that in the future we should make better use of the
> 8bit-clean path of HTTP/2 to avoid having to repeat such exceptions,
> but I'm sure we'll have to go a long way before reaching this stage :-/

I agree, but that's a completely orthogonal project.

Best regards, Julian