Re: [websec] Strict-Transport-Security syntax redux

Julian Reschke <julian.reschke@gmx.de> Sat, 29 October 2011 08:07 UTC

Return-Path: <julian.reschke@gmx.de>
X-Original-To: websec@ietfa.amsl.com
Delivered-To: websec@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6DAF121F86C1 for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 01:07:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.316
X-Spam-Level:
X-Spam-Status: No, score=-104.316 tagged_above=-999 required=5 tests=[AWL=-1.717, BAYES_00=-2.599, USER_IN_WHITELIST=-100]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CgmpraPuux+u for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 01:07:36 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.23]) by ietfa.amsl.com (Postfix) with SMTP id 8337021F86AA for <websec@ietf.org>; Sat, 29 Oct 2011 01:07:35 -0700 (PDT)
Received: (qmail invoked by alias); 29 Oct 2011 08:07:34 -0000
Received: from p5DCC93A7.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.147.167] by mail.gmx.net (mp065) with SMTP; 29 Oct 2011 10:07:34 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1/8HNxCXQX8ZJ1PXBsL/mflag4/w4rsT9RM5X2lhG G9K6ffyb5alE4x
Message-ID: <4EABB440.1030906@gmx.de>
Date: Sat, 29 Oct 2011 10:07:28 +0200
From: Julian Reschke <julian.reschke@gmx.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1
MIME-Version: 1.0
To: Adam Barth <ietf@adambarth.com>
References: <4EAB66B3.4090404@KingsMountain.com> <CAJE5ia8SkXpwymXVgbjE7YejeNwoMsieUMMgHyBUbi5w2508iQ@mail.gmail.com>
In-Reply-To: <CAJE5ia8SkXpwymXVgbjE7YejeNwoMsieUMMgHyBUbi5w2508iQ@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
X-Y-GMX-Trusted: 0
Cc: IETF WebSec WG <websec@ietf.org>
Subject: Re: [websec] Strict-Transport-Security syntax redux
X-BeenThere: websec@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Web Application Security Minus Authentication and Transport <websec.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/websec>, <mailto:websec-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/websec>
List-Post: <mailto:websec@ietf.org>
List-Help: <mailto:websec-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/websec>, <mailto:websec-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 29 Oct 2011 08:07:36 -0000

On 2011-10-29 05:08, Adam Barth wrote:
> ...
>> Except for RFC6265, which in the algorithm for parsing "Max-Age=", it
>> algorithmically provides for ignoring a value that doesn't match the
>> effective value ABNF of..
>>
>>   ["-"]*DIGIT
>>
>> ..which would catch the max-age="1" case, but doesn't seem to explicitly
>> address..
>>
>>   max-age=
>
> That's handled by some more general processing rules in the spec.  The
> net result is that it's ignored.
>
>> But in any case, perhaps (additional) browser implementor folk could chime
>> in here -- do we really need to address such detail-level issues (both of
>> the examples above and below) in the syntax/grammar we specify in specs such
>> as these? Or is the new ABNF proposed in the original message in this thread
>> sufficient?
>
> Generally, we prefer to be instructed exactly how to behave for every
> possible input (even illegal ones).  There's a long history of
> quoted-string not being implemented correctly by browsers.  I spec
> this as just splitting the string on ; and then processing each
> substring separately, ignoring bogus/future ones.  I know Julian has a
> dream that all HTTP headers will be parsed the same, but quoted-string
> is sufficiently ill-defined w.r.t. error handling that I prefer to
> avoid it.
> ...

- when discussing generic parsing, we need to distinguish between legacy 
cases like cookies, and new headers, where we can do better

- standardizing handling of broken headers is one thing (and in general 
I prefer not to), but that doesn't mean that when defining a new header 
field we shouldn't minimize the things a sender can get wrong; if we 
know that some recipients will accept both token and quoted-string 
anyway, then it seems like a good thing to simply allow them both, 
reducing the number of special-cases in parsing

- not sure what you mean by "ill-defined w.r.t. error handling"; it's 
defined just like most other syntax elements in HTTP -- is there 
something *specific* to quoted-string you have in mind?

Best regards, Julian