Re: [precis] RFC 8264 / 8265 Order of rules

William Fisher <william.w.fisher@gmail.com> Tue, 05 December 2017 03:58 UTC

Return-Path: <william.w.fisher@gmail.com>
X-Original-To: precis@ietfa.amsl.com
Delivered-To: precis@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E5676124207 for <precis@ietfa.amsl.com>; Mon, 4 Dec 2017 19:58:28 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.699
X-Spam-Level:
X-Spam-Status: No, score=-2.699 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com
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 nUqR5DlJyuuH for <precis@ietfa.amsl.com>; Mon, 4 Dec 2017 19:58:27 -0800 (PST)
Received: from mail-lf0-x232.google.com (mail-lf0-x232.google.com [IPv6:2a00:1450:4010:c07::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id ACB5F120454 for <precis@ietf.org>; Mon, 4 Dec 2017 19:58:26 -0800 (PST)
Received: by mail-lf0-x232.google.com with SMTP id i2so21615423lfe.9 for <precis@ietf.org>; Mon, 04 Dec 2017 19:58:26 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=rpmACn/V74PU3rCxoIN4QL82nQkw6GF4XhXp57O9myk=; b=si1cR4PEENUS7GveON/b7ssjRyB32eKDxOL+AMc9Tug2lF26GQWuc/hROhNPEHd32S A6VjCfL7DCHwTq5jQkgwBQb2+adnZPoqhvePywOnck/RdH3qdg9D9JH+pXfgtTbUkCdG j6fFuwUzjDXDZMjUJC7mptMITOFkT+pYpR5O/9D6SWk6/L0JJxajlYy/Ga1aurXL9JZz nWz31mcJsXMHgfXlVn9OZa/ncksyFhVVGkcksl2ve2RNwmJiFbgo9QmNdEbwSk2K1Sg0 4YkMIQ1RIkICPi0Nkt8+47E/reE2VQHNVw9gI16O2aE33iA6sTF/hnt/vVc0K+tIoDSn rHBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=rpmACn/V74PU3rCxoIN4QL82nQkw6GF4XhXp57O9myk=; b=sogT/xHQtu2fVlsq5rfB0oev2gUuDkJpO26ZZ7bsZ9Wt6fyNnO6nPU4eEis+clSxER G6DS+rw3FiuR4sWsZ+tT3W1XDJKid+C4HXtTHEZZGAuTWmvDwipKA6YP0Uqn7Y/3fYc0 TdJFPeRy0v6QuYqfVdYG5WGxArBX2z/kGBD9rilTBt/4W2O1mvW1FmFEqZejoLLmpChA 0KqN2Klw/8CJ20vYnmNLupVEWzXJ7pf4GnU+GQL6w7i0/G/ls8YxqxyU6f2INKC0acgF BdHzTveMSdOKPxq1qQYB3NkN5JSgj+T/RIGQy9JXGDzlWNPDpY2uDMPUtFwJgXB9z8dY 25Gg==
X-Gm-Message-State: AJaThX65cKZLtST+lO23HOiRzoDc+lI8wYwGOP3HC1OwfIkZlL5c28QG 0EZFVSQmCwZZvMBRjqqvnDa3CD525AaU4fVrJJ6oxuhF
X-Google-Smtp-Source: AGs4zMYAGF3xCLx/Vb86l/CdYUA0SmnamsFdwy/6+RcRGoqtQgPrhB/UrNShfQlMNO56T8xAnOCLpHKW95Qra/nJ7is=
X-Received: by 10.46.91.129 with SMTP id m1mr9651600lje.185.1512446304765; Mon, 04 Dec 2017 19:58:24 -0800 (PST)
MIME-Version: 1.0
Received: by 10.179.26.33 with HTTP; Mon, 4 Dec 2017 19:58:24 -0800 (PST)
In-Reply-To: <0207F020-32D2-4181-A020-3143BD8E88FE@gmx.de>
References: <0207F020-32D2-4181-A020-3143BD8E88FE@gmx.de>
From: William Fisher <william.w.fisher@gmail.com>
Date: Mon, 4 Dec 2017 20:58:24 -0700
Message-ID: <CAHVjMKFYO=9twJeJkM7YCv1tT6Fv=4Psw482EPS43sedMyeiSQ@mail.gmail.com>
To: Christian Schudt <christian.schudt@gmx.de>
Cc: precis@ietf.org
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/precis/g-zK_eyyvR4EQGJqftyyCmJrq-I>
Subject: Re: [precis] RFC 8264 / 8265 Order of rules
X-BeenThere: precis@ietf.org
X-Mailman-Version: 2.1.22
Precedence: list
List-Id: Preparation and Comparison of Internationalized Strings <precis.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/precis>, <mailto:precis-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/precis/>
List-Post: <mailto:precis@ietf.org>
List-Help: <mailto:precis-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/precis>, <mailto:precis-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 05 Dec 2017 03:58:29 -0000

On Mon, Dec 4, 2017 at 4:06 PM, Christian Schudt
<christian.schudt@gmx.de> wrote:
> If a user wishes to create a username with U+212B (Angstrom sign), should an application reject it (because it’s disallowed) or allow it, because enforcement converts the character to a valid code point first?

I implemented enforcement based on the rules in RFC 8264 section 7.
The behavioral rules (IdentifierClass) are applied last.

>>> from precis_i18n import get_profile
>>> ic = get_profile('IdentifierClass')
>>> ic.enforce('\u212b')
Traceback (most recent call last):
 ...
UnicodeEncodeError: 'IdentifierClass' codec can't encode character
'\u212b' in position 0: DISALLOWED/has_compat
>>> un = get_profile('UsernameCasePreserved')
>>> un.enforce('\u212b')
'Å'

See also:
  https://www.ietf.org/mail-archive/web/precis/current/msg01225.html

You're right that the references to preparation in RFC 8265 (sections
3.3.2, 3.4.2) are at odds with RFC 8264 and the mailing list.

-Bill