
From nobody Tue Sep 10 07:39:03 2019
Return-Path: <ralphm@ik.nu>
X-Original-To: xmpp@ietfa.amsl.com
Delivered-To: xmpp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0475612008A for <xmpp@ietfa.amsl.com>; Tue, 10 Sep 2019 07:39:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=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 bmJUsiYvtDYm for <xmpp@ietfa.amsl.com>; Tue, 10 Sep 2019 07:38:59 -0700 (PDT)
Received: from mag.ik.nu (mag.ik.nu [IPv6:2001:985:2560:1::42]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 9D22B12007C for <xmpp@ietf.org>; Tue, 10 Sep 2019 07:38:59 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1]) by mag.ik.nu (Postfix) with ESMTP id 365B51600E9; Tue, 10 Sep 2019 16:38:57 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at mag.ik.nu
Received: from mag.ik.nu ([IPv6:::1]) by localhost (mag.ik.nu [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id O3-CVpwiOLVN; Tue, 10 Sep 2019 16:38:54 +0200 (CEST)
Received: from [IPv6:2001:985:2560:1:95a7:f2d6:4ace:4715] (unknown [IPv6:2001:985:2560:1:95a7:f2d6:4ace:4715]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: ralphm) by mag.ik.nu (Postfix) with ESMTPSA id 937CF1600BF; Tue, 10 Sep 2019 16:38:52 +0200 (CEST)
To: xmpp@ietf.org
From: Ralph Meijer <ralphm@ik.nu>
Cc: Peter Saint-Andre <stpeter@mozilla.com>, Alexey Melnikov <aamelnikov@fastmail.fm>, Barry Leiba <barryleiba@computer.org>
Message-ID: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
Date: Tue, 10 Sep 2019 16:38:50 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
Archived-At: <https://mailarchive.ietf.org/arch/msg/xmpp/a-WhzOTyOq168GujQHgzQ1-DURI>
Subject: [xmpp] Unicode Version Interop Concerns in JIDs
X-BeenThere: xmpp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: XMPP Working Group <xmpp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xmpp>, <mailto:xmpp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xmpp/>
List-Post: <mailto:xmpp@ietf.org>
List-Help: <mailto:xmpp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 10 Sep 2019 14:39:02 -0000

Hi,

Recently, there's been a discussion in the XSF Discussion room [1] about 
interop issues in the face of different Unicode versions used for 
processing XMPP Addresses, or JIDs. That particular discussion was 
mostly focused on nicknames in Multi-User Chat (MUC) rooms, which are 
encoded in the resourcepart of a JID, but is a concern for other address 
handling. As I suggested giving this topic a wider audience, I write on 
behalf of those involved in the initial discussion.

Ever since RFC 6122 was obsoleted by RFC 7622 [2], both titled “XMPP: 
Address Format”, resourceprep (which was fixed to Unicode 3.2) was 
replaced by PRÉCIS processing as discussed in section 3.4. This in turn 
the the resourcepart is a OpaqueString profile of the PRECIS 
FreeformClass as defined in RFC 7613 [3], section 4.2 and RFC 7564 [4], 
section 4.3 respectively. The idea is that in the face of newer Unicode 
versions, application can make use of the new codepoints therein.

RFC 7622 has extensive texts on JID handling, but there is uncertaintly 
over when servers, services like MUC, and clients, should be liberal or 
strict when checking JIDs. Different implementations perform their 
processing based on differing versions of Unicode, implementations have 
install bases still depending on older versions of the software and thus 
the Unicode version they check against, and finally, there are 
implementations and deployments performing the obsoleted stringprep.

A particular example is the following. Say a MUC service (including its 
server-to-server (s2s) handling) checks against Unicode version 12. One 
user, with a client and their server checking against Unicode >=9, 
chooses to use the nickname 'I♥🥓' (I love bacon). The MUC service 
assumes everything is fine, and the occupant JID becomes 
room@muc.server.example/I♥🥓. Both the BLACK HEART SUIT (U+2665) and 
BACON (U+1F953) are in the Symbols, Other (So) category, and thus valid 
for FreeformClass.

Now another user comes along, using a server that supports Unicode 6.3. 
Since BACON wasn't defined before Unicode 9, its code point is 
unassigned. When receiving presence from the other user, what should the 
receiving server do?

  a) It is liberal in what it accepts from other servers, it passes 
incoming remote stanzas on to the client.

  b) It is strict, and sends back a <jid-malformed/>, which likely boots 
the recipient from the room.

  c) In case a), if it wants to use private messaging towards the 
occupant JID, their own server might reject this with a similar 
<jid-malformed/> error.

The above is just an example. MIX [5] refers to RFC 7700 [6], obsoleted 
by RFC 8266, for preparing nicknames, which in turn also depends on 
FreeformClass, and thus exhibiting similar concerns, but not on the 
routing level.

Basically the question comes down to: how do we robustly handle 
different Unicode Versions in clients, services, and servers?

[1] <xmpp:xsf@muc.xmpp.org>
[2] RFC 7622: XMPP: Address Format
     <https://tools.ietf.org/html/rfc7622>
[3] RFC 7613: PRECIS Representing Usernames and Passwords
     <https://tools.ietf.org/html/rfc7613>
[4] RFC 7564: PRECIS in Application Protocols
     <https://tools.ietf.org/html/rfc7564>
[5] XEP-0369: Mediated Information eXchange (MIX)
     <https://xmpp.org/extensions/xep-0369.html>
[6] <https://tools.ietf.org/html/rfc7700>
[7] RFC 8266: PRECIS Representing Nicknames
     <https://tools.ietf.org/html/rfc8266>

-- 
ralphm


From nobody Fri Sep 13 00:35:55 2019
Return-Path: <fschmaus@gmail.com>
X-Original-To: xmpp@ietfa.amsl.com
Delivered-To: xmpp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 4193712004D for <xmpp@ietfa.amsl.com>; Fri, 13 Sep 2019 00:35:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.922
X-Spam-Level: 
X-Spam-Status: No, score=-1.922 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.026, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=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 Io2-PVGfH56u for <xmpp@ietfa.amsl.com>; Fri, 13 Sep 2019 00:35:51 -0700 (PDT)
Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) (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 047B0120020 for <xmpp@ietf.org>; Fri, 13 Sep 2019 00:35:51 -0700 (PDT)
Received: by mail-wr1-f47.google.com with SMTP id i18so312606wru.11 for <xmpp@ietf.org>; Fri, 13 Sep 2019 00:35:50 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:openpgp:autocrypt :message-id:date:user-agent:mime-version:in-reply-to; bh=hF6IAz1XPKyN6WMV7ztGprItDngPPkS3/G5F3N87Vjs=; b=ivjxygcqTvMI2hMRbGCBhHvFeBl2PtFhrdowwH5VVBOEZGV/1yhHgpY55pVjBGEkmm pekDRymM6segYQMkFuuhH0OELiSsNUBXC4WehKWpE8sIY07koXAyTzBXB9Ipt7KPZTOL p/ZsU435NVMiutJmPV+aaN7IaszQtlW+K8LcVKrDZlHEKzagdeUVteUivP3u1xBNWRi5 Sy4ffAK/bwM/BV6tATrdABD9VNh//Jk5O9gcNu2uawU7sO/ttljauGCOfZa/04dpzhu6 ovmJqVGXEtoMWAiDnfoZm1qRasWj1eLWpZl5yj/Ac1wWS1zXoxDARQggoHbgNR2iq9DC S9Aw==
X-Gm-Message-State: APjAAAVxpNqexADC59LIMLCQBgZsbha14yYmhe3OBDgGmNIXo4vHdfyR zy9k39Xp0ui/nLyqET+zfE7sKzVWYsg=
X-Google-Smtp-Source: APXvYqwzCLuSHNyRa24YuYe/dGPjP5KZ/SBek1Zy/vWlhcpFud3ek1vrvGDkqD62fXw04VVbvcKkBw==
X-Received: by 2002:adf:f606:: with SMTP id t6mr5195820wrp.197.1568360148828;  Fri, 13 Sep 2019 00:35:48 -0700 (PDT)
Received: from [10.188.34.160] (nat-inf2.rrze.uni-erlangen.de. [131.188.6.45]) by smtp.googlemail.com with ESMTPSA id q192sm1541702wme.23.2019.09.13.00.35.47 for <xmpp@ietf.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Sep 2019 00:35:47 -0700 (PDT)
To: xmpp@ietf.org
References: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
From: Florian Schmaus <flo@geekplace.eu>
Openpgp: preference=signencrypt
Autocrypt: addr=flo@geekplace.eu; prefer-encrypt=mutual; keydata= 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 wmAlqFE=
Message-ID: <b1eccf9b-e43b-9c38-c589-81c4a042487f@geekplace.eu>
Date: Fri, 13 Sep 2019 09:35:46 +0200
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0
MIME-Version: 1.0
In-Reply-To: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="FUPHomxaR6T9J7DQf5qS3sge3xV4GeCYc"
Archived-At: <https://mailarchive.ietf.org/arch/msg/xmpp/Qh261Z73mEr6TS7dUvcG44CXT74>
Subject: Re: [xmpp] Unicode Version Interop Concerns in JIDs
X-BeenThere: xmpp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: XMPP Working Group <xmpp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xmpp>, <mailto:xmpp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xmpp/>
List-Post: <mailto:xmpp@ietf.org>
List-Help: <mailto:xmpp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Sep 2019 07:35:54 -0000

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--FUPHomxaR6T9J7DQf5qS3sge3xV4GeCYc
Content-Type: multipart/mixed; boundary="cSYIVEMJlLnn1Pkgmyhpj1mnXiD1zS3iG";
 protected-headers="v1"
From: Florian Schmaus <flo@geekplace.eu>
To: xmpp@ietf.org
Message-ID: <b1eccf9b-e43b-9c38-c589-81c4a042487f@geekplace.eu>
Subject: Re: [xmpp] Unicode Version Interop Concerns in JIDs
References: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
In-Reply-To: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>

--cSYIVEMJlLnn1Pkgmyhpj1mnXiD1zS3iG
Content-Type: text/plain; charset=utf-8
Content-Language: en-GB
Content-Transfer-Encoding: quoted-printable

On 10.09.19 16:38, Ralph Meijer wrote:
> Now another user comes along, using a server that supports Unicode 6.3.=

> Since BACON wasn't defined before Unicode 9, its code point is
> unassigned. When receiving presence from the other user, what should th=
e
> receiving server do?


There is a fourth option/solution:

       agility regarding the supported Unicode standard.

PRECIS libraries typically use the Unicode/Character predicate and
property retrieval functions (.e.g., isISOControl(),
getDirectionality(), =E2=80=A6) from their runtime environment. For examp=
le the
java.lang.Character API.

The problem is that most runtimes only update their supported Unicode
version with new (major) runtime release (e.g., Java 9). The key
observation here is: to support a new version of the Unicode standard,
no API changes or changes of the PRECIS library are necessary. What
changes is usually that a code point transitions from unassigned to
assigned, and so do its properties, and hence the return values of that
Unicode predicate and property retrieval functions.

So it would be great if runtimes would provide a way to load a new
Unicode Character Database [1] without updating the runtime environment.
Something like Character.loadUnicodeDb("unicode-12.1.0.dat")

Now I know that we may not have not much control over what functionality
runtime environments provide. However, nothing prevents you from using
(or implementing) a Unicode library with that such feature. I am
considering implementing something like that in [2]. The whole process
could eventually be automated, which, I believe, is solving the issue
Ralph describes.

- Florian

1: http://www.unicode.org/reports/tr44/tr44-24.html
2: https://bitbucket.org/sco0ter/precis


--cSYIVEMJlLnn1Pkgmyhpj1mnXiD1zS3iG--

--FUPHomxaR6T9J7DQf5qS3sge3xV4GeCYc
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEEl3UFnzoh3OFr5PuuIjmn6PWFIFIFAl17RtJfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDk3
NzUwNTlGM0EyMURDRTE2QkU0RkJBRTIyMzlBN0U4RjU4NTIwNTIACgkQIjmn6PWF
IFIUPQf+MqiL0HKSSd6rS2feAeX3vPc7WnGvVLRZeJngbwknw+KSkf2XS7Okwpxm
XXTqH3S0PoWJyQjEihLaTmWqejylMYGA0bsT9rwE9L3xT3ZxXhygr6sKGupPPMVX
npPJZiYc/56Oi7hlM38iEGyEXXuUYC/nkdpTveIPIxoimRQ6pCYcnF7s0u/phP99
4Un1upyiM+iXJuT6HyggDUiTDVhnDm1r1yG116T+A+jyKuaFIFgqWUtByDUXz3SD
XumGtCOhjevT4lP+SRNs9FD0S4OfCgIV6LVsTFlQwbfVmNygAohs2lAR/a67rBRx
rRuDAZMECOz7UitS1ZF7iHHTxPZpUA==
=Kg0N
-----END PGP SIGNATURE-----

--FUPHomxaR6T9J7DQf5qS3sge3xV4GeCYc--


From nobody Fri Sep 13 15:20:54 2019
Return-Path: <sam@samwhited.com>
X-Original-To: xmpp@ietfa.amsl.com
Delivered-To: xmpp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 02EA7120116 for <xmpp@ietfa.amsl.com>; Fri, 13 Sep 2019 15:20:52 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.701
X-Spam-Level: 
X-Spam-Status: No, score=-2.701 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=samwhited.com header.b=ZV1trocQ; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=bKbEem6G
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 JAwxikMNu2MY for <xmpp@ietfa.amsl.com>; Fri, 13 Sep 2019 15:20:50 -0700 (PDT)
Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 329C61200FA for <xmpp@ietf.org>; Fri, 13 Sep 2019 15:20:50 -0700 (PDT)
Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 385F354E for <xmpp@ietf.org>; Fri, 13 Sep 2019 18:20:49 -0400 (EDT)
Received: from imap34 ([10.202.2.84]) by compute4.internal (MEProxy); Fri, 13 Sep 2019 18:20:49 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samwhited.com; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type:content-transfer-encoding; s=fm3; bh=JuKGs KkTQWPaSXwxZEU8Wr3Cxo2vJkxxHiQzvL3xcRg=; b=ZV1trocQMFeE9a8ZP91X6 t4x+XlGZ7Sd1dfgHUc24iE4n9dCrGJYBCZcJ1+YxFBbDqxuiSkHqoO13OCNkOU1e X6TyJby581DsJRtN2Q8kN2hBv6JhIhEbzb7oVwY4Mte1NQ2Y+II2nME8uNQRo1aC PpU3i/H0kL5xFaGzeuIOsU12GynjZC/yi/g/wCfhHE/uzb/YCjKeua6acSLaH+/y lYmtsVtGhbqcCpOK1vgPKvhU13c4jyn+KSPfEstwY2+mUu/6VE1pWbX+OY9IV+tu TJupRmOGTdDfm06ceOQZ/iVxQufWAKZe2U7jHeUo5n23a6ubBUe7ZFlni8wshMC8 w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=JuKGsKkTQWPaSXwxZEU8Wr3Cxo2vJkxxHiQzvL3xc Rg=; b=bKbEem6Gl/1JkG4s2uf+8Z0Zc3Dh1uKaRMvkHkKv5QoUIzgdpAePq5oUM dS32SLsIT8HrCBSN6ubQYB3JfvKTFJAsF40IvHsUW0QLG2GJI1DOtrfDsXLmywFK 4xlgSaapaxyk82F329JddKaxhE23NV6vYfGVF763HGMlOHgUKOmZSqGJfrhWAYjT F/DIfINNXbMS6umqBLPCS19QT0vp6CzmU7UPOUIYlOCZtlw2hJ3dgAttAr54ewXQ gLV+dGwkfattxTdzjb60KBEPpMLf44/d78nkhHzVlVTDOA8wPtRAPHLnrSTEICBd oxca9jSnat54PwNnrjH+EL/Iv5EIA==
X-ME-Sender: <xms:QBZ8XYnGVl0wpTgxxcF9QC398pV-mLOxxnzqbXLyDWuXf-EZw4YhwA>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrtdekgddtfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgfgsehtqh ertderreejnecuhfhrohhmpedfufgrmhcuhghhihhtvggufdcuoehsrghmsehsrghmfihh ihhtvggurdgtohhmqeenucfrrghrrghmpehmrghilhhfrhhomhepshgrmhesshgrmhifhh hithgvugdrtghomhenucevlhhushhtvghrufhiiigvpedt
X-ME-Proxy: <xmx:QBZ8Xe_PvPsFcluui_QhXEYx0KnrZGSJSE1S336YgkOojjlKg64_tg> <xmx:QBZ8XZC_Y7TS85RIFAKqq6SKzp01txuYqS5lrcuvzRARRq1q0-jkUA> <xmx:QBZ8XeTas6JyTKSu2xsVC0s9zVRN8-_KRTVZl2iiQPATpnjrvmu6Fg> <xmx:QBZ8XfBAK5E_QJusIhtY1-soxmlsluYQ1yk4DylstsY2NuL0L5sf3g>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id 590241460061; Fri, 13 Sep 2019 18:20:48 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.1.7-237-gf35468d-fmstable-20190912v1
Mime-Version: 1.0
Message-Id: <8e5f9f1b-3968-42fe-8882-dce84a47734f@www.fastmail.com>
In-Reply-To: <b1eccf9b-e43b-9c38-c589-81c4a042487f@geekplace.eu>
References: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu> <b1eccf9b-e43b-9c38-c589-81c4a042487f@geekplace.eu>
Date: Fri, 13 Sep 2019 22:20:28 +0000
From: "Sam Whited" <sam@samwhited.com>
To: xmpp@ietf.org
Content-Type: text/plain;charset=utf-8
Content-Transfer-Encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/xmpp/2VsMKp-FsDlQ_kCJgTEfT3vlmCE>
Subject: Re: [xmpp] Unicode Version Interop Concerns in JIDs
X-BeenThere: xmpp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: XMPP Working Group <xmpp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xmpp>, <mailto:xmpp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xmpp/>
List-Post: <mailto:xmpp@ietf.org>
List-Help: <mailto:xmpp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 13 Sep 2019 22:20:52 -0000

On Fri, Sep 13, 2019, at 07:35, Florian Schmaus wrote:
> So it would be great if runtimes would provide a way to load a new
> Unicode Character Database [1] without updating the runtime
> environment. Something like Character.loadUnicodeDb("unicode-
> 12.1..dat")

The various Go Unicode libraries do this (more or less). They provide
build options that allow you to pick a Unicode version, so you could
always build with the latest one or possibly link in multiple (I think,
I haven't tried that but I don't see why it wouldn't work).

> Now I know that we may not have not much control over what
> functionality runtime environments provide. However, nothing prevents
> you from using (or implementing) a Unicode library with that such
> feature. I am considering implementing something like that in [2]. The=

> whole process could eventually be automated, which, I believe, is
> solving the issue Ralph describes.

Sort of. Having libraries that link in UCD data or similar makes things
easier, but we still have to decide what's supported, what special cases=

need to be worked around (I'm sure there will be some odd bugs and what
not that crop up with different versions), do we do negotiation or
support a specific range of versions, what if you're using an old
version of the XMPP client that doesn't have the new data files shipped
with it or linked in, etc.

I agree Unicode related libraries should support multiple versions, I
just don't think that really solves the problem of how we address
that in the XMPP specs and how we address compatibility between
clients and servers.

=E2=80=94Sam

--=20
Sam Whited


From nobody Mon Sep 23 08:52:21 2019
Return-Path: <alexey.melnikov@isode.com>
X-Original-To: xmpp@ietfa.amsl.com
Delivered-To: xmpp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5573A120130 for <xmpp@ietfa.amsl.com>; Mon, 23 Sep 2019 08:52:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2
X-Spam-Level: 
X-Spam-Status: No, score=-2 tagged_above=-999 required=5 tests=[BAYES_00=-1.9,  DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=isode.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 RPDx4qe5cRPy for <xmpp@ietfa.amsl.com>; Mon, 23 Sep 2019 08:52:17 -0700 (PDT)
Received: from statler.isode.com (Statler.isode.com [62.232.206.189]) by ietfa.amsl.com (Postfix) with ESMTP id D724B12084A for <xmpp@ietf.org>; Mon, 23 Sep 2019 08:52:16 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1569253936; d=isode.com; s=june2016; i=@isode.com; bh=S8qIJ9rfH0/3zQ3Nl6dnfAodPZsMfb2HXtJtNwzelx8=; h=From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version: In-Reply-To:References:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description; b=Wj+mNgRNcQIkR106sQuHjai4hWnbtODVaYdnkKhAuE2tXDJw8vmI/jUk6pbukUEVJJ1+kB LHrlD9/2F/5MvA4TLzqPJEwbdtWRWQVPNXSWPfXD15DoGVTUR3MjFX2r/2To4p6NgyR6aN +5nC8RaZIeb9ZABeWFZU4Yw9bCWikxc=;
Received: from [192.168.1.237] (host86-134-78-18.range86-134.btcentralplus.com [86.134.78.18])  by statler.isode.com (submission channel) via TCP with ESMTPSA  id <XYjqLQB8p54O@statler.isode.com>; Mon, 23 Sep 2019 16:52:15 +0100
To: Ralph Meijer <ralphm@ik.nu>, xmpp@ietf.org
Cc: Peter Saint-Andre <stpeter@mozilla.com>, Alexey Melnikov <aamelnikov@fastmail.fm>, Barry Leiba <barryleiba@computer.org>
References: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
From: Alexey Melnikov <alexey.melnikov@isode.com>
Autocrypt: addr=alexey.melnikov@isode.com; prefer-encrypt=mutual; keydata= xsBNBFWQBiQBCADFmiucA1/FCqO+LUOm/Xf2+NpPuSbPcLAWd0x1K1V4F1WTPScSolQ/u0y8 faozrF3uQXZxInvmLJOALfOqm4lfg8CN2BqAxMrlCqka1Ku8UJ9A6kOGaZWlBKUmiIjVng9D 91k8MRare9dE5b0Yj33mUO/ifhC+np0H7CXpB6E2IzvAUkgWCPlXEVO6ffV1Xr+J/UeArqoF Fj1RoMN+Kc701e3GzKHpuryng66Jx9+k7daOSgWNF1zOU1JCJKIZ1uHIlzro1y0KtvWTwwM1 331q72HWESG0NatDnu1QotxxFHLDQFsHZ59A5yvIdyeZvjuEr9paorNVIk7Esg4THaljABEB AAHNK0FsZXhleSBNZWxuaWtvdiA8YWxleGV5Lm1lbG5pa292QGlzb2RlLmNvbT7CwHkEEwEI ACMFAlWQBiQCGw8HCwkIBwMCAQYVCAIJCgsEFgIDAQIeAQIXgAAKCRBdp82zsCM7iDACB/4q EiLSBhpjDJ+pm1f6IXQvtTW3YGrca0kidZ0yX/qn30bkRtFsjXJVOspKENzBhZCI5bX/Si0I qKkR0DqnuJqchVzKXl25HfMvA2w2KRr8VFLFWMnCB4/jnaMWWQ4EV1MqbyFXl3m0LwZ1U4rd EQLvzPTNd8tqyy093rN53jTl0FmBAEHYzbUHsYB6wx8gqJBFkIGEgPHftZboJ/8ywo983YBQ /8Brb8awV3PeonmHc7W9QMKoN37U9VLbXOvAZVDvJ4QI1P/P3Uad1tkkeyuCcluuPe2M7CjK HF8zQHYGSCz70NY+MhbfhgT5WMjPuW5ls+Q1yES257+lmRkx3eyT
Message-ID: <481768d0-7ca4-b515-32b2-223b1d3e816c@isode.com>
Date: Mon, 23 Sep 2019 16:52:12 +0100
User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:68.0) Gecko/20100101 Thunderbird/68.0
In-Reply-To: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-transfer-encoding: quoted-printable
Archived-At: <https://mailarchive.ietf.org/arch/msg/xmpp/SXymXR6fubMwe-FjNnOVDUenr-U>
Subject: Re: [xmpp] Unicode Version Interop Concerns in JIDs
X-BeenThere: xmpp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: XMPP Working Group <xmpp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xmpp>, <mailto:xmpp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xmpp/>
List-Post: <mailto:xmpp@ietf.org>
List-Help: <mailto:xmpp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Sep 2019 15:52:20 -0000

Hi Ralph,

On 10/09/2019 15:38, Ralph Meijer wrote:
> Hi,
>=20
> Recently, there's been a discussion in the XSF Discussion room [1] about
> interop issues in the face of different Unicode versions used for
> processing XMPP Addresses, or JIDs. That particular discussion was
> mostly focused on nicknames in Multi-User Chat (MUC) rooms, which are
> encoded in the resourcepart of a JID, but is a concern for other address
> handling. As I suggested giving this topic a wider audience, I write on
> behalf of those involved in the initial discussion.
>=20
> Ever since RFC 6122 was obsoleted by RFC 7622 [2], both titled =E2=80=9CXM=
PP:
> Address Format=E2=80=9D, resourceprep (which was fixed to Unicode 3.2) was
> replaced by PR=C3=89CIS processing as discussed in section 3.4. This in tu=
rn
> the the resourcepart is a OpaqueString profile of the PRECIS
> FreeformClass as defined in RFC 7613 [3], section 4.2 and RFC 7564 [4],
> section 4.3 respectively. The idea is that in the face of newer Unicode
> versions, application can make use of the new codepoints therein.
>=20
> RFC 7622 has extensive texts on JID handling, but there is uncertaintly
> over when servers, services like MUC, and clients, should be liberal or
> strict when checking JIDs. Different implementations perform their
> processing based on differing versions of Unicode, implementations have
> install bases still depending on older versions of the software and thus
> the Unicode version they check against, and finally, there are
> implementations and deployments performing the obsoleted stringprep.
>=20
> A particular example is the following. Say a MUC service (including its
> server-to-server (s2s) handling) checks against Unicode version 12. One
> user, with a client and their server checking against Unicode >=3D9,
> chooses to use the nickname 'I=E2=99=A5=F0=9F=A5=93' (I love bacon). The M=
UC service
> assumes everything is fine, and the occupant JID becomes
> room@muc.server.example/I=E2=99=A5=F0=9F=A5=93. Both the BLACK HEART SUIT =
(U+2665) and
> BACON (U+1F953) are in the Symbols, Other (So) category, and thus valid
> for FreeformClass.
>=20
> Now another user comes along, using a server that supports Unicode 6.3.
> Since BACON wasn't defined before Unicode 9, its code point is
> unassigned. When receiving presence from the other user, what should the
> receiving server do?
>=20
> =C2=A0a) It is liberal in what it accepts from other servers, it passes
> incoming remote stanzas on to the client.
>=20
> =C2=A0b) It is strict, and sends back a <jid-malformed/>, which likely boo=
ts
> the recipient from the room.
>=20
> =C2=A0c) In case a), if it wants to use private messaging towards the
> occupant JID, their own server might reject this with a similar
> <jid-malformed/> error.
>=20
> The above is just an example. MIX [5] refers to RFC 7700 [6], obsoleted
> by RFC 8266, for preparing nicknames, which in turn also depends on
> FreeformClass, and thus exhibiting similar concerns, but not on the
> routing level.
>=20
> Basically the question comes down to: how do we robustly handle
> different Unicode Versions in clients, services, and servers?

I agree this is a problem and as you demonstrate above there might not
be any simple solution for it. I think this issue deserve a document to
be written (an Internet Draft or an XSF document).

My personal inclination is that clients/servers should be liberal with
unassigned codepoints in JIDs that they don't control (i.e. servers can
be strict with local JIDs, but should be liberal with remote JIDs),
which I think is either case a) or an extension of it.

Best Regards,
Alexey

> [1] <xmpp:xsf@muc.xmpp.org>
> [2] RFC 7622: XMPP: Address Format
> =C2=A0=C2=A0=C2=A0 <https://tools.ietf.org/html/rfc7622>
> [3] RFC 7613: PRECIS Representing Usernames and Passwords
> =C2=A0=C2=A0=C2=A0 <https://tools.ietf.org/html/rfc7613>
> [4] RFC 7564: PRECIS in Application Protocols
> =C2=A0=C2=A0=C2=A0 <https://tools.ietf.org/html/rfc7564>
> [5] XEP-0369: Mediated Information eXchange (MIX)
> =C2=A0=C2=A0=C2=A0 <https://xmpp.org/extensions/xep-0369.html>
> [6] <https://tools.ietf.org/html/rfc7700>
> [7] RFC 8266: PRECIS Representing Nicknames
> =C2=A0=C2=A0=C2=A0 <https://tools.ietf.org/html/rfc8266>
>=20


From nobody Mon Sep 23 13:11:41 2019
Return-Path: <waqas20@gmail.com>
X-Original-To: xmpp@ietfa.amsl.com
Delivered-To: xmpp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 80B7312000F for <xmpp@ietfa.amsl.com>; Mon, 23 Sep 2019 13:11:39 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.748
X-Spam-Level: 
X-Spam-Status: No, score=-1.748 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=no 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 kZCwMifEuhdW for <xmpp@ietfa.amsl.com>; Mon, 23 Sep 2019 13:11:37 -0700 (PDT)
Received: from mail-oi1-x22b.google.com (mail-oi1-x22b.google.com [IPv6:2607:f8b0:4864:20::22b]) (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 21DE0120020 for <xmpp@ietf.org>; Mon, 23 Sep 2019 13:11:37 -0700 (PDT)
Received: by mail-oi1-x22b.google.com with SMTP id w144so8774669oia.6 for <xmpp@ietf.org>; Mon, 23 Sep 2019 13:11:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;  h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=+znZvvqali4cc0o5+7d5vjfPAjtsGC1F6n9aMxxt0P0=; b=hbqkp2gVPkidBKJ5AFvektcagp8S54LUyDdOFWeadrKHxVtkwHqIcgvAYnPxqtlZwA VDtsE6G9Ds7NZN/BbUs9Fe9bzHHt1b9KGPbGtQdR2YKBI/bsetgfYRk3pfkZeOd8jTUs gcAKZbJP95nCU12MRqmPF9zsq93jVttAzBPi+6/e8J8tch92dY4euiJfqq0wCEh1nzap lBsE7ntAr+Xa2p6iMyvDHIzjoFkwjRaN4TkhC30fxaxa5/Jrelo8XSWVZK5aJwq2hnqi gLFttZO7NNx45YH1PFvZVQmKNas3jho2eJI7U2V7nxUOuzvxR+qsQKV7m/3nd2RIC7B/ pwqQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=+znZvvqali4cc0o5+7d5vjfPAjtsGC1F6n9aMxxt0P0=; b=ii0OTE6lAcotp5ezWoCPb93RXwBA+b/8sFFuqmmTBcyu15Ga9u/Q2Xdmt1RQW06wJH snxtxX2Khy7ukYQUrhco33n54unBAAVV/1Tgz9H69cq5BUsuMonQGLKWV+5q5MWMbaVj W0APyRMtuzWnRoEw1TG/IZSTAv4HTnA4RI8u9Za/rf4BGS8AdeIFuqGrSs3CdQUvFN/N VlKBshyRMWNxhi36Tr0u0/QCbd0DMoUufW4y2GX2NKy+CNEfSmZnBzniJEe1MRAmTrvI 31f9SICSqnV/ciyApZMLaSuadlfvfiftB0ae7kDiAeVXVKwvYw+35qFMzICiXqa89h7K 4NPA==
X-Gm-Message-State: APjAAAVuljgpWKAO58xe2M+/qMVt8mHvFBQond93qgmM/2jS4lj+XvjQ 77NYmK3fyvo3C6+nyH4uRqvDv/TIUwAg6GDqIWI=
X-Google-Smtp-Source: APXvYqwBB1iUQeMKU/uMou42cLdJRj7MLmKAuyAXkz5WeZb3M4ZPLIHPurpG+Y8RqLzVjdzKyxRgVSOhwr7mV2yWOpU=
X-Received: by 2002:aca:7212:: with SMTP id p18mr1558327oic.165.1569269496267;  Mon, 23 Sep 2019 13:11:36 -0700 (PDT)
MIME-Version: 1.0
References: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
In-Reply-To: <dbbb91ba-9116-50f7-fefa-09ef2bd5991d@ik.nu>
From: Waqas Hussain <waqas20@gmail.com>
Date: Mon, 23 Sep 2019 16:11:25 -0400
Message-ID: <CALm9TZ8zba_ubSX=WvOSqFib_MMYR5P4jp+_4wc5DeRCU09Q7w@mail.gmail.com>
To: Ralph Meijer <ralphm@ik.nu>
Cc: XMPP Working Group <xmpp@ietf.org>, Alexey Melnikov <aamelnikov@fastmail.fm>,  Barry Leiba <barryleiba@computer.org>
Content-Type: multipart/alternative; boundary="000000000000e1c9b705933e0667"
Archived-At: <https://mailarchive.ietf.org/arch/msg/xmpp/HAGTHbisrRnySzdqaOH-tEQFxgM>
Subject: Re: [xmpp] Unicode Version Interop Concerns in JIDs
X-BeenThere: xmpp@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: XMPP Working Group <xmpp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/xmpp>, <mailto:xmpp-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/xmpp/>
List-Post: <mailto:xmpp@ietf.org>
List-Help: <mailto:xmpp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/xmpp>, <mailto:xmpp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 23 Sep 2019 20:11:40 -0000

--000000000000e1c9b705933e0667
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Tue, Sep 10, 2019 at 10:39 AM Ralph Meijer <ralphm@ik.nu> wrote:

> Hi,
>
> Recently, there's been a discussion in the XSF Discussion room [1] about
> interop issues in the face of different Unicode versions used for
> processing XMPP Addresses, or JIDs. That particular discussion was
> mostly focused on nicknames in Multi-User Chat (MUC) rooms, which are
> encoded in the resourcepart of a JID, but is a concern for other address
> handling. As I suggested giving this topic a wider audience, I write on
> behalf of those involved in the initial discussion.
>
> Ever since RFC 6122 was obsoleted by RFC 7622 [2], both titled =E2=80=9CX=
MPP:
> Address Format=E2=80=9D, resourceprep (which was fixed to Unicode 3.2) wa=
s
> replaced by PR=C3=89CIS processing as discussed in section 3.4. This in t=
urn
> the the resourcepart is a OpaqueString profile of the PRECIS
> FreeformClass as defined in RFC 7613 [3], section 4.2 and RFC 7564 [4],
> section 4.3 respectively. The idea is that in the face of newer Unicode
> versions, application can make use of the new codepoints therein.
>
> RFC 7622 has extensive texts on JID handling, but there is uncertaintly
> over when servers, services like MUC, and clients, should be liberal or
> strict when checking JIDs. Different implementations perform their
> processing based on differing versions of Unicode, implementations have
> install bases still depending on older versions of the software and thus
> the Unicode version they check against, and finally, there are
> implementations and deployments performing the obsoleted stringprep.
>
> A particular example is the following. Say a MUC service (including its
> server-to-server (s2s) handling) checks against Unicode version 12. One
> user, with a client and their server checking against Unicode >=3D9,
> chooses to use the nickname 'I=E2=99=A5=F0=9F=A5=93' (I love bacon). The =
MUC service
> assumes everything is fine, and the occupant JID becomes
> room@muc.server.example/I=E2=99=A5=F0=9F=A5=93. Both the BLACK HEART SUIT=
 (U+2665) and
> BACON (U+1F953) are in the Symbols, Other (So) category, and thus valid
> for FreeformClass.
>
> Now another user comes along, using a server that supports Unicode 6.3.
> Since BACON wasn't defined before Unicode 9, its code point is
> unassigned. When receiving presence from the other user, what should the
> receiving server do?
>
>   a) It is liberal in what it accepts from other servers, it passes
> incoming remote stanzas on to the client.
>
>   b) It is strict, and sends back a <jid-malformed/>, which likely boots
> the recipient from the room.
>
>   c) In case a), if it wants to use private messaging towards the
> occupant JID, their own server might reject this with a similar
> <jid-malformed/> error.
>
> The above is just an example. MIX [5] refers to RFC 7700 [6], obsoleted
> by RFC 8266, for preparing nicknames, which in turn also depends on
> FreeformClass, and thus exhibiting similar concerns, but not on the
> routing level.
>
> Basically the question comes down to: how do we robustly handle
> different Unicode Versions in clients, services, and servers?
>
> [1] <xmpp:xsf@muc.xmpp.org>
> [2] RFC 7622: XMPP: Address Format
>      <https://tools.ietf.org/html/rfc7622>
> [3] RFC 7613: PRECIS Representing Usernames and Passwords
>      <https://tools.ietf.org/html/rfc7613>
> [4] RFC 7564: PRECIS in Application Protocols
>      <https://tools.ietf.org/html/rfc7564>
> [5] XEP-0369: Mediated Information eXchange (MIX)
>      <https://xmpp.org/extensions/xep-0369.html>
> [6] <https://tools.ietf.org/html/rfc7700>
> [7] RFC 8266: PRECIS Representing Nicknames
>      <https://tools.ietf.org/html/rfc8266>
>
> --
> ralphm
>
> _______________________________________________
> xmpp mailing list
> xmpp@ietf.org
> https://www.ietf.org/mailman/listinfo/xmpp



There's an old thread on this from 2011 on the IETF list. I don't believe
the core compatibility issue ever got resolved. See this message and the
connected thread:

https://mailarchive.ietf.org/arch/msg/xmpp/A2PT_EpDpR1swKbHC_te0NWwRgs

We also lack any form of advertisement of supported unicode version by a
remote entity, which is unfortunate. A stream feature and a caps hash may
be useful.

--
Waqas

--000000000000e1c9b705933e0667
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"></div><br><div class=3D"gmail_quote"><div=
 dir=3D"ltr" class=3D"gmail_attr">On Tue, Sep 10, 2019 at 10:39 AM Ralph Me=
ijer &lt;<a href=3D"mailto:ralphm@ik.nu">ralphm@ik.nu</a>&gt; wrote:<br></d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex">Hi,<br>
<br>
Recently, there&#39;s been a discussion in the XSF Discussion room [1] abou=
t <br>
interop issues in the face of different Unicode versions used for <br>
processing XMPP Addresses, or JIDs. That particular discussion was <br>
mostly focused on nicknames in Multi-User Chat (MUC) rooms, which are <br>
encoded in the resourcepart of a JID, but is a concern for other address <b=
r>
handling. As I suggested giving this topic a wider audience, I write on <br=
>
behalf of those involved in the initial discussion.<br>
<br>
Ever since RFC 6122 was obsoleted by RFC 7622 [2], both titled =E2=80=9CXMP=
P: <br>
Address Format=E2=80=9D, resourceprep (which was fixed to Unicode 3.2) was =
<br>
replaced by PR=C3=89CIS processing as discussed in section 3.4. This in tur=
n <br>
the the resourcepart is a OpaqueString profile of the PRECIS <br>
FreeformClass as defined in RFC 7613 [3], section 4.2 and RFC 7564 [4], <br=
>
section 4.3 respectively. The idea is that in the face of newer Unicode <br=
>
versions, application can make use of the new codepoints therein.<br>
<br>
RFC 7622 has extensive texts on JID handling, but there is uncertaintly <br=
>
over when servers, services like MUC, and clients, should be liberal or <br=
>
strict when checking JIDs. Different implementations perform their <br>
processing based on differing versions of Unicode, implementations have <br=
>
install bases still depending on older versions of the software and thus <b=
r>
the Unicode version they check against, and finally, there are <br>
implementations and deployments performing the obsoleted stringprep.<br>
<br>
A particular example is the following. Say a MUC service (including its <br=
>
server-to-server (s2s) handling) checks against Unicode version 12. One <br=
>
user, with a client and their server checking against Unicode &gt;=3D9, <br=
>
chooses to use the nickname &#39;I=E2=99=A5=F0=9F=A5=93&#39; (I love bacon)=
. The MUC service <br>
assumes everything is fine, and the occupant JID becomes <br>
room@muc.server.example/I=E2=99=A5=F0=9F=A5=93. Both the BLACK HEART SUIT (=
U+2665) and <br>
BACON (U+1F953) are in the Symbols, Other (So) category, and thus valid <br=
>
for FreeformClass.<br>
<br>
Now another user comes along, using a server that supports Unicode 6.3. <br=
>
Since BACON wasn&#39;t defined before Unicode 9, its code point is <br>
unassigned. When receiving presence from the other user, what should the <b=
r>
receiving server do?<br>
<br>
=C2=A0 a) It is liberal in what it accepts from other servers, it passes <b=
r>
incoming remote stanzas on to the client.<br>
<br>
=C2=A0 b) It is strict, and sends back a &lt;jid-malformed/&gt;, which like=
ly boots <br>
the recipient from the room.<br>
<br>
=C2=A0 c) In case a), if it wants to use private messaging towards the <br>
occupant JID, their own server might reject this with a similar <br>
&lt;jid-malformed/&gt; error.<br>
<br>
The above is just an example. MIX [5] refers to RFC 7700 [6], obsoleted <br=
>
by RFC 8266, for preparing nicknames, which in turn also depends on <br>
FreeformClass, and thus exhibiting similar concerns, but not on the <br>
routing level.<br>
<br>
Basically the question comes down to: how do we robustly handle <br>
different Unicode Versions in clients, services, and servers?<br>
<br>
[1] &lt;<a href=3D"mailto:xmpp%3Axsf@muc.xmpp.org" target=3D"_blank">xmpp:x=
sf@muc.xmpp.org</a>&gt;<br>
[2] RFC 7622: XMPP: Address Format<br>
=C2=A0 =C2=A0 =C2=A0&lt;<a href=3D"https://tools.ietf.org/html/rfc7622" rel=
=3D"noreferrer" target=3D"_blank">https://tools.ietf.org/html/rfc7622</a>&g=
t;<br>
[3] RFC 7613: PRECIS Representing Usernames and Passwords<br>
=C2=A0 =C2=A0 =C2=A0&lt;<a href=3D"https://tools.ietf.org/html/rfc7613" rel=
=3D"noreferrer" target=3D"_blank">https://tools.ietf.org/html/rfc7613</a>&g=
t;<br>
[4] RFC 7564: PRECIS in Application Protocols<br>
=C2=A0 =C2=A0 =C2=A0&lt;<a href=3D"https://tools.ietf.org/html/rfc7564" rel=
=3D"noreferrer" target=3D"_blank">https://tools.ietf.org/html/rfc7564</a>&g=
t;<br>
[5] XEP-0369: Mediated Information eXchange (MIX)<br>
=C2=A0 =C2=A0 =C2=A0&lt;<a href=3D"https://xmpp.org/extensions/xep-0369.htm=
l" rel=3D"noreferrer" target=3D"_blank">https://xmpp.org/extensions/xep-036=
9.html</a>&gt;<br>
[6] &lt;<a href=3D"https://tools.ietf.org/html/rfc7700" rel=3D"noreferrer" =
target=3D"_blank">https://tools.ietf.org/html/rfc7700</a>&gt;<br>
[7] RFC 8266: PRECIS Representing Nicknames<br>
=C2=A0 =C2=A0 =C2=A0&lt;<a href=3D"https://tools.ietf.org/html/rfc8266" rel=
=3D"noreferrer" target=3D"_blank">https://tools.ietf.org/html/rfc8266</a>&g=
t;<br>
<br>
-- <br>
ralphm<br>
<br>
_______________________________________________<br>
xmpp mailing list<br>
<a href=3D"mailto:xmpp@ietf.org" target=3D"_blank">xmpp@ietf.org</a><br>
<a href=3D"https://www.ietf.org/mailman/listinfo/xmpp" rel=3D"noreferrer" t=
arget=3D"_blank">https://www.ietf.org/mailman/listinfo/xmpp</a></blockquote=
><div><br></div><div><br></div><div>There&#39;s an old thread on this from =
2011 on the IETF list. I don&#39;t believe the core compatibility issue eve=
r got resolved. See this message and the connected thread:</div><div><br></=
div><div><a href=3D"https://mailarchive.ietf.org/arch/msg/xmpp/A2PT_EpDpR1s=
wKbHC_te0NWwRgs">https://mailarchive.ietf.org/arch/msg/xmpp/A2PT_EpDpR1swKb=
HC_te0NWwRgs</a><br></div><div><br></div><div>We also lack any form of adve=
rtisement of supported unicode version by a remote entity, which is unfortu=
nate. A stream feature and a caps hash may be useful.</div><div><br></div><=
div>--</div><div>Waqas</div><div><br></div></div></div>

--000000000000e1c9b705933e0667--

