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

Julian Reschke <julian.reschke@gmx.de> Sat, 29 October 2011 08:19 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 AE45021F84CC for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 01:19:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.276
X-Spam-Level:
X-Spam-Status: No, score=-104.276 tagged_above=-999 required=5 tests=[AWL=-1.677, 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 kR88CrtOX+lH for <websec@ietfa.amsl.com>; Sat, 29 Oct 2011 01:19:43 -0700 (PDT)
Received: from mailout-de.gmx.net (mailout-de.gmx.net [213.165.64.22]) by ietfa.amsl.com (Postfix) with SMTP id BBDE521F84CB for <websec@ietf.org>; Sat, 29 Oct 2011 01:19:42 -0700 (PDT)
Received: (qmail invoked by alias); 29 Oct 2011 08:19:36 -0000
Received: from p5DCC93A7.dip.t-dialin.net (EHLO [192.168.178.36]) [93.204.147.167] by mail.gmx.net (mp054) with SMTP; 29 Oct 2011 10:19:36 +0200
X-Authenticated: #1915285
X-Provags-ID: V01U2FsdGVkX1+ae2ZX1zuaxzCOhL8uB1Lps4RzyYdx+VhPwCqayw ekTz8zKVfXSOk2
Message-ID: <4EABB712.5000002@gmx.de>
Date: Sat, 29 Oct 2011 10:19:30 +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> <4EABB440.1030906@gmx.de> <CAJE5ia8rDCDVsK1WjGZO6tBfvFnpmeLDRzhg-F_xBipSHa9tYg@mail.gmail.com>
In-Reply-To: <CAJE5ia8rDCDVsK1WjGZO6tBfvFnpmeLDRzhg-F_xBipSHa9tYg@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:19:43 -0000

On 2011-10-29 10:10, Adam Barth wrote:
> On Sat, Oct 29, 2011 at 1:07 AM, Julian Reschke<julian.reschke@gmx.de>  wrote:
>> 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?
>
> Most of HTTP is ill-defined w.r.t. error handling.  We muddle through
> with reverse engineering.
> ...

It's not ill-defined, but undefined (by design) - see 
<http://trac.tools.ietf.org/wg/httpbis/trac/ticket/186>.

What I was trying to understand whether there's something special with 
respect to quoted-string?

Best regards, Julian