Re: New Version Notification for draft-kamp-httpbis-structure-01.txt (fwd)

Julian Reschke <julian.reschke@gmx.de> Thu, 17 November 2016 08:06 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 (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 40E52129681 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 17 Nov 2016 00:06:40 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.398
X-Spam-Level:
X-Spam-Status: No, score=-8.398 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_HI=-5, RP_MATCHES_RCVD=-1.497, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 7hGGyVapuMYg for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 17 Nov 2016 00:06:38 -0800 (PST)
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 C3024129668 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 17 Nov 2016 00:06:38 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1c7Heo-0006GX-Uw for ietf-http-wg-dist@listhub.w3.org; Thu, 17 Nov 2016 08:02:54 +0000
Resent-Date: Thu, 17 Nov 2016 08:02:54 +0000
Resent-Message-Id: <E1c7Heo-0006GX-Uw@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <julian.reschke@gmx.de>) id 1c7HeZ-0006CT-9Y for ietf-http-wg@listhub.w3.org; Thu, 17 Nov 2016 08:02:39 +0000
Received: from mout.gmx.net ([212.227.15.18]) by titan.w3.org with esmtps (TLS1.2:DHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from <julian.reschke@gmx.de>) id 1c7HeR-0003sc-Qk for ietf-http-wg@w3.org; Thu, 17 Nov 2016 08:02:34 +0000
Received: from [31.133.143.223] ([31.133.143.223]) by mail.gmx.com (mrgmx002 [212.227.17.190]) with ESMTPSA (Nemesis) id 0MWBpJ-1cHvfI03pJ-00XNOg; Thu, 17 Nov 2016 09:01:41 +0100
To: Kazuho Oku <kazuhooku@gmail.com>, Willy Tarreau <w@1wt.eu>
References: <78354.1477853918@critter.freebsd.dk> <CANatvzx5RSnnN9ybqh6tRqKV=7NVO+PTpgAuVUU+6JuKGFtczg@mail.gmail.com> <20161117055345.GB9646@1wt.eu> <CANatvzwrPxyRPET5SO6fYGZ_6NnqToU9a630x1gjZXx5uAbeuw@mail.gmail.com>
Cc: Poul-Henning Kamp <phk@critter.freebsd.dk>, HTTP Working Group <ietf-http-wg@w3.org>
From: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <1775eacb-65e5-7339-0910-c2f1ca1fd457@gmx.de>
Date: Thu, 17 Nov 2016 09:01:35 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0
MIME-Version: 1.0
In-Reply-To: <CANatvzwrPxyRPET5SO6fYGZ_6NnqToU9a630x1gjZXx5uAbeuw@mail.gmail.com>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit
X-Provags-ID: V03:K0:Bl6tYlcs3GgZrLqEA4nkNpY9YNVmiF3JaJ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: pass client-ip=212.227.15.18; envelope-from=julian.reschke@gmx.de; helo=mout.gmx.net
X-W3C-Hub-Spam-Status: No, score=-6.5
X-W3C-Hub-Spam-Report: AWL=0.117, BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1c7HeR-0003sc-Qk 7edb51d12e0bc898618b654234cb3b61
X-Original-To: ietf-http-wg@w3.org
Subject: Re: New Version Notification for draft-kamp-httpbis-structure-01.txt (fwd)
Archived-At: <http://www.w3.org/mid/1775eacb-65e5-7339-0910-c2f1ca1fd457@gmx.de>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/32920
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 2016-11-17 08:17, Kazuho Oku wrote:
> Hi,
>
> 2016-11-17 14:53 GMT+09:00 Willy Tarreau <w@1wt.eu>eu>:
>> Hi Kazuho,
>>
>> On Thu, Nov 17, 2016 at 10:06:04AM +0900, Kazuho Oku wrote:
>>> Hi,
>>>
>>> Thank you for writing the draft.
>>>
>>> Regarding the numbers, could we either exclude floating point from the
>>> specification or state that an integral number MUST be encoded without
>>> using a dot?
>>>
>>> The reason I ask is because it is hard to correctly implement a parser
>>> for floating point numbers, and a bug in the parser would likely lead
>>> to a vulnerability [1]. Note that in some (if not most) of the
>>> programming languages you would need to implement your own number
>>> parser to meet the needs. For example, you cannot use sscanf in C,
>>> because depending on the locale the function allows use of decimal
>>> points other than '.'.
>>>
>>> If we could exclude floating point numbers from the specification
>>> entirely or have a restriction something like above, parser
>>> implementors can refrain from implementing their own floating point
>>> number parsers until the specification in which they are interested in
>>> actually start using the notation.
>>>
>>> Non-integral numbers are rarely used in the HTTP headers. The only one
>>> I can recall is the q value of Accept-Encoding, but it is not a
>>> floating-point but actually a fixed-point number (of three decimals
>>> below the point), which could have been represented by using integral
>>> numbers between 0 to 1000.
>>>
>>>      weight = OWS ";" OWS "q=" qvalue
>>>      qvalue = ( "0" [ "." 0*3DIGIT ] )
>>>             / ( "1" [ "." 0*3("0") ] )
>>
>> I'd like to avoid FP as well. However it's important to note that fixed
>> point numbers is not exempt from similar issues due to the way they are
>> encoded, since everyone will store them in floats/doubles,
>
> Yes. Therefore, I believe that the we should discourage people from
> using fixed point numbers.
>
> For example, if we want to define a quality value like the one found
> in Accept-Encoding, we should not use three-digit fixed point numbers,
> but instead use an integral value between 0 to 1000.
>
> That way, we can totally avoid the issues introduced by a dot within a number.
> ...

+1 in general, but that approach wouldn't work well in cases where we 
want to allow different levels of precision (such as timestamps that 
optionally would allow fractions of seconds)

Best regards, Julian