Re: [apps-discuss] character repertoire for fragment identifiers

Nico Williams <nico@cryptonector.com> Mon, 12 January 2015 05:30 UTC

Return-Path: <nico@cryptonector.com>
X-Original-To: apps-discuss@ietfa.amsl.com
Delivered-To: apps-discuss@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id A3F2B1A8895 for <apps-discuss@ietfa.amsl.com>; Sun, 11 Jan 2015 21:30:36 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.666
X-Spam-Level:
X-Spam-Status: No, score=-1.666 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, IP_NOT_FRIENDLY=0.334, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=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 z_OMec0EwWk9 for <apps-discuss@ietfa.amsl.com>; Sun, 11 Jan 2015 21:30:35 -0800 (PST)
Received: from homiemail-a64.g.dreamhost.com (sub4.mail.dreamhost.com [69.163.253.135]) by ietfa.amsl.com (Postfix) with ESMTP id 61B7B1A88A4 for <apps-discuss@ietf.org>; Sun, 11 Jan 2015 21:30:35 -0800 (PST)
Received: from homiemail-a64.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a64.g.dreamhost.com (Postfix) with ESMTP id DD25243807C; Sun, 11 Jan 2015 21:30:34 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=cryptonector.com; h=date :from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=cryptonector.com; bh=p5ubvFdXkqwlL/ rZC8hA240GFpw=; b=OAUWZv+gDUZw+dhwylyM4pzUmXVbw2pQwCTKhiW3T6Xcvk JcCDPazAFy0xoYFZ4Sf8MU+EV1OsNpt0Il/3aA2nds2NfGKomRzsmCWvY0dWQk2C nY8N3TO7f+sIeCK6YrTASHFKypYJbbM0gcdb6/KQHGam4/580meUvVvxQi6Gg=
Received: from localhost (108-207-244-174.lightspeed.austtx.sbcglobal.net [108.207.244.174]) (Authenticated sender: nico@cryptonector.com) by homiemail-a64.g.dreamhost.com (Postfix) with ESMTPA id 8A9A4438072; Sun, 11 Jan 2015 21:30:34 -0800 (PST)
Date: Sun, 11 Jan 2015 23:30:34 -0600
From: Nico Williams <nico@cryptonector.com>
To: Julian Reschke <julian.reschke@gmx.de>
Message-ID: <20150112053032.GF16323@localhost>
References: <05AD7DE2-1C54-45CD-B33A-13766D771E57@mnot.net> <54B2A2CD.5080502@gmx.de> <1A5BBD25-FEBD-49B1-9EFB-4EF8877BF0E7@mnot.net> <54B2A4F9.2070909@gmx.de> <54B2A894.4020201@intertwingly.net> <54B2ABA8.6030205@gmx.de> <54B2C6FA.80802@intertwingly.net> <54B2EE08.9040705@gmx.de> <54B2F527.7040404@intertwingly.net> <54B2FB76.6040208@gmx.de>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <54B2FB76.6040208@gmx.de>
User-Agent: Mutt/1.5.21 (2010-09-15)
Archived-At: <http://mailarchive.ietf.org/arch/msg/apps-discuss/T0ZN4ox6hYUOkJ57Q54AGQhcErs>
Cc: apps-discuss@ietf.org
Subject: Re: [apps-discuss] character repertoire for fragment identifiers
X-BeenThere: apps-discuss@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: General discussion of application-layer protocols <apps-discuss.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/apps-discuss/>
List-Post: <mailto:apps-discuss@ietf.org>
List-Help: <mailto:apps-discuss-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/apps-discuss>, <mailto:apps-discuss-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 12 Jan 2015 05:30:36 -0000

On Sun, Jan 11, 2015 at 11:38:46PM +0100, Julian Reschke wrote:
> b) The *parser* never needs to percent encode anything. A *sender*
> would need to percent-encode (*) if fragments stay the way thy are.
> Q: how is that a problem in practice?

Exactly.

Protocol slots that limit content to US-ASCII must use appropriate
encoding, which means that the code putting non-ASCII content into such
slots should do the necessary encoding.  For IRIs this is described in
RFC3987.

Whether non-ASCII Unicode forms may appear in slots where they are
allowed is a much more interesting question.  RFC3987 says "yes".

E.g., IRIs in SANs MUST be encoded into URIs per-RFC3987 because RFC5280
defines the uniformResourceIdentifier arm of the GeneralName CHOICE as
IA5String.  If we were to add an IRI OtherName for PKIX then a non-ASCII
then IRIs could appear _there_ in their Unicode, unencoded form.

The location bar of the browser *is* a protocol element of sorts:
because it's involved in cut-n-paste [local, but still real] protocols,
because of JavaScript.

The location bar therefore is a Unicode-aware slot[*] and MUST accept
IRIs (Unicode), but it also MUST accept ASCII encoded IRIs (because of
one might be pasted in).  Because it's also a UI element, the location
bar MUST display Unicode.

[*] Because it's a UI element, and because a string and strings are
    Unicode strings in JavaScript.  I admit this is hand-waving: there
    is no requirement that a browser support JavaScript, and there can
    be no requirement that the UI facing part of it use Unicode when the
    locale doesn't.  A browser could accept non-Unicode, non-ASCII in a
    non-Unicode, non-ASCII locale, but since at some point the rubber
    has to meet the road and an ASCII URI will be needed, the browser
    effectively has to do the encodings that RFC3987 says to do, which
    means the browser must deal in Unicode, which means we might as well
    speak of the location bar as being Unicode-aware even in cases where
    the locale uses a Unicode-incompatible codeset.

> ((*) Maybe it's time to coin a term for the
> utf-8-encode-then-uri-percent-escape thingy)
> 
> >It may come to pass that Roy is the only person who shares the goals
> >that he described.  In which case, the end result will be an appendix to
> 
> I believe I share these goals.

Me too.  I don't see why there's any controversy here.  What am I
missing?

> >the URL standard which describes the real world use cases that RFC 3986
> >does not address which prevent a proper layering.  Additionally, there
> >would be a description of what the set of outputs from a URL
> >parse/stringification process does produce, i.e., a description of what
> >RFC 3986 should have said.
> 
> Which brings us back to the question what exactly is wrong with RFC
> 3986. So far I heard "what it says about IDNA". What else?

IMO nothing, not even that.

I don't want to see punycoded/pct-encoded strings in my UIs -- no one
does[**].  But that doesn't mean that protocol elements shouldn't have
to see them either.  Yes, sometimes encoded strings will leak where they
shouldn't (and then someone has to work to plug the leak).

[**] End users anyways.

Nico
--