[Json] Naked surrogates already banned?

Tim Bray <tbray@textuality.com> Fri, 18 October 2013 01:37 UTC

Return-Path: <tbray@textuality.com>
X-Original-To: json@ietfa.amsl.com
Delivered-To: json@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id C508511E8202 for <json@ietfa.amsl.com>; Thu, 17 Oct 2013 18:37:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.588
X-Spam-Level:
X-Spam-Status: No, score=-3.588 tagged_above=-999 required=5 tests=[AWL=0.788, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, GB_I_LETTER=-2, HTML_MESSAGE=0.001, J_CHICKENPOX_14=0.6, RCVD_IN_DNSWL_LOW=-1]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Hmd3kcpnrGA0 for <json@ietfa.amsl.com>; Thu, 17 Oct 2013 18:36:57 -0700 (PDT)
Received: from mail-la0-f51.google.com (mail-la0-f51.google.com [209.85.215.51]) by ietfa.amsl.com (Postfix) with ESMTP id A844411E812F for <json@ietf.org>; Thu, 17 Oct 2013 18:36:56 -0700 (PDT)
Received: by mail-la0-f51.google.com with SMTP id hp15so150092lab.24 for <json@ietf.org>; Thu, 17 Oct 2013 18:36:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=lHzJcg6vLVN6Ss/jdVw6qTgR8Ytf0VP9JWIqnu01VUg=; b=ktKge2TbVbW3Skh4o7lJZMwht0woV/snBspQVnj2IsBQet/1AJtRubNXUjRrf1IVfC aG0hH3OS2ttHd3Sss6n97Hcd02l1lkijE836nJTGNMMgmlWvY+0/zrfSRKAPhfI2dfQO yTUIItOEEe++Hpq062t9GsfsK4uIl8MUyjBrsxfKl9/e790x1ESVzMytKNLzdTbTFUBp RcGrAWwTaj0t2MbeMisA7lYREyeimgMCcEdSSjWKHNkZR2sCPvpiSeAJxBrwM4nNL8Lm GhRctyF7uRwNk9PzSa/YAZNbl7CjnNL2Uty7kEWo++QNiAjbZtxdjiBC2y1RV4jkVzvL 9niA==
X-Gm-Message-State: ALoCoQkwBlIkk9hK3TBZ4RJIbApTXG8CYoP8zBAtZONXK55WnqWpvfl5uHtj6Yq+ra1ty/Vsyia8
MIME-Version: 1.0
X-Received: by 10.153.11.134 with SMTP id ei6mr240132lad.38.1382060215571; Thu, 17 Oct 2013 18:36:55 -0700 (PDT)
Received: by 10.114.10.200 with HTTP; Thu, 17 Oct 2013 18:36:55 -0700 (PDT)
X-Originating-IP: [24.84.235.32]
Date: Thu, 17 Oct 2013 18:36:55 -0700
Message-ID: <CAHBU6itESY9bzSZ-0VnLq-VNcPg_LbR_q-kuaVzTyLQL9tTKcw@mail.gmail.com>
From: Tim Bray <tbray@textuality.com>
To: "json@ietf.org" <json@ietf.org>
Content-Type: multipart/alternative; boundary=001a113456ea3523d704e8f9f8c0
Subject: [Json] Naked surrogates already banned?
X-BeenThere: json@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: "JavaScript Object Notation \(JSON\) WG mailing list" <json.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/json>, <mailto:json-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/json>
List-Post: <mailto:json@ietf.org>
List-Help: <mailto:json-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/json>, <mailto:json-request@ietf.org?subject=subscribe>
X-List-Received-Date: Fri, 18 Oct 2013 01:37:04 -0000

I was looking closely at the 4627 text and just about convinced myself that
it already bans

{"a": "\uDEAD"}

It says Any character may be escaped. If the character is in the Basic
Multilingual Plane (U+0000 through U+FFFF), then it may be represented as a
six-character sequence: a reverse solidus, followed by the lowercase letter
u,... etc

But U+DEAD is not a character.  So a narrow reading would make that
illegal.  Not that any implementation I’ve encountered enforces that. -T