Re: [http-state] Ticket 11: Character encoding for non-ASCII cookies values

Adam Barth <ietf@adambarth.com> Wed, 03 March 2010 23:17 UTC

Return-Path: <ietf@adambarth.com>
X-Original-To: http-state@core3.amsl.com
Delivered-To: http-state@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 025DF3A8CB8 for <http-state@core3.amsl.com>; Wed, 3 Mar 2010 15:17:14 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.977
X-Spam-Level:
X-Spam-Status: No, score=-1.977 tagged_above=-999 required=5 tests=[AWL=0.000, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Orbz2ipK2ZlY for <http-state@core3.amsl.com>; Wed, 3 Mar 2010 15:17:13 -0800 (PST)
Received: from mail-qy0-f201.google.com (mail-qy0-f201.google.com [209.85.221.201]) by core3.amsl.com (Postfix) with ESMTP id 04F4A3A8C53 for <http-state@ietf.org>; Wed, 3 Mar 2010 15:17:12 -0800 (PST)
Received: by qyk39 with SMTP id 39so1477441qyk.22 for <http-state@ietf.org>; Wed, 03 Mar 2010 15:17:12 -0800 (PST)
Received: by 10.224.44.233 with SMTP id b41mr573047qaf.278.1267658231819; Wed, 03 Mar 2010 15:17:11 -0800 (PST)
Received: from mail-iw0-f189.google.com (mail-iw0-f189.google.com [209.85.223.189]) by mx.google.com with ESMTPS id 6sm3917365qwd.54.2010.03.03.15.17.09 (version=SSLv3 cipher=RC4-MD5); Wed, 03 Mar 2010 15:17:11 -0800 (PST)
Received: by iwn27 with SMTP id 27so1622083iwn.5 for <http-state@ietf.org>; Wed, 03 Mar 2010 15:17:08 -0800 (PST)
MIME-Version: 1.0
Received: by 10.231.146.130 with SMTP id h2mr287938ibv.43.1267658228478; Wed, 03 Mar 2010 15:17:08 -0800 (PST)
In-Reply-To: <alpine.DEB.2.00.1003032150381.3143@tvnag.unkk.fr>
References: <5c4444771003021624qc0b00cet27e348cb6d023b08@mail.gmail.com> <CB794A2E-2F2F-4CE4-8B15-BBE1A1E1B50F@apple.com> <alpine.DEB.2.00.1003032150381.3143@tvnag.unkk.fr>
From: Adam Barth <ietf@adambarth.com>
Date: Wed, 03 Mar 2010 15:16:48 -0800
Message-ID: <5c4444771003031516u445525d1le174512ef46bad30@mail.gmail.com>
To: Daniel Stenberg <daniel@haxx.se>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Cc: http-state <http-state@ietf.org>
Subject: Re: [http-state] Ticket 11: Character encoding for non-ASCII cookies values
X-BeenThere: http-state@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Discuss HTTP State Management Mechanism <http-state.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/http-state>
List-Post: <mailto:http-state@ietf.org>
List-Help: <mailto:http-state-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/http-state>, <mailto:http-state-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Mar 2010 23:17:14 -0000

On Wed, Mar 3, 2010 at 12:53 PM, Daniel Stenberg <daniel@haxx.se> wrote:
> On Wed, 3 Mar 2010, Mark Pauley wrote:
>> In the future, we ought to treat these as opaque octets.  However, the
>> current cookie spec would lead me to believe that we should reject any
>> cookies that contain control characters, which would be most non-ascii UTF-8
>> sequences, right?
>
> Isn't the RFC2616 'token' a bit too strict for cookie-value ? The netscape
> spec is _very_ liberal ("a sequence of characters excluding semi-colon,
> comma and white space") so the current wording is a great deal more
> restrictive.

To which wording are you referring?  We recommend that servers send
only tokens but require that user agent process a wide range of exotic
characters.

> Don't cookie implementations already allow and use for example ()<>:@? etc?

Yes they do.  They also allow $, which is problematic for Yngve's
(Phase 2) $Origin proposal.

Adam