[vwrap] Parsing of invalid LLSD elements in XML
Joshua Bell <josh@lindenlab.com> Wed, 31 March 2010 21:52 UTC
Return-Path: <josh@lindenlab.com>
X-Original-To: vwrap@core3.amsl.com
Delivered-To: vwrap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix)
with ESMTP id B99173A6AE6 for <vwrap@core3.amsl.com>;
Wed, 31 Mar 2010 14:52:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.56
X-Spam-Level: *
X-Spam-Status: No, score=1.56 tagged_above=-999 required=5 tests=[AWL=-0.194,
BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13, FM_FORGED_GMAIL=0.622,
HTML_MESSAGE=0.001]
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 9aPpVMPzK0q8 for
<vwrap@core3.amsl.com>; Wed, 31 Mar 2010 14:52:59 -0700 (PDT)
Received: from mail-wy0-f172.google.com (mail-wy0-f172.google.com
[74.125.82.172]) by core3.amsl.com (Postfix) with ESMTP id B1D2F3A6AE3 for
<vwrap@ietf.org>; Wed, 31 Mar 2010 14:52:58 -0700 (PDT)
Received: by wyb29 with SMTP id 29so260036wyb.31 for <vwrap@ietf.org>;
Wed, 31 Mar 2010 14:53:25 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.216.91.8 with HTTP; Wed, 31 Mar 2010 14:53:25 -0700 (PDT)
Date: Wed, 31 Mar 2010 14:53:25 -0700
Received: by 10.216.176.212 with SMTP id b62mr1301357wem.179.1270072405107;
Wed, 31 Mar 2010 14:53:25 -0700 (PDT)
Message-ID: <q2uf72742de1003311453y212ff98ay13d6f70d77565536@mail.gmail.com>
From: Joshua Bell <josh@lindenlab.com>
To: vwrap@ietf.org
Content-Type: multipart/alternative; boundary=0016e649d9b68ba57104831fc621
Subject: [vwrap] Parsing of invalid LLSD elements in XML
X-BeenThere: vwrap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group
<vwrap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vwrap>
List-Post: <mailto:vwrap@ietf.org>
List-Help: <mailto:vwrap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 31 Mar 2010 21:52:59 -0000
Mark Lentczner and I were discussing this issue earlier today offline, and I
wanted to recap it to the list.
draft-hamrick-vwrap-type-system-00 does not define what should happen when
trying to parse this LLSD XML fragment (pretend it has the right prologue
and hence is well-formed XML):
<llsd>
<map>
<key>test</key>
<uuid>this is not a uuid</uuid>
</map>
</llsd>
There are at least three reasonable outcomes:
(1) Reject the payload entirely - the entire message should be rejected
(2) Produces a map; value associated with key "test" is a UUID of
00000000-0000-0000-0000-000000000000 - which would be the result of
converting the string "this is not a uuid" to a UUID
(3) Produces a map; value associated with key "test" is the Undefined value
(The map is, strictly speaking unnecessary, to the example, but it clarifies
the context in which #3 occurs)
This is not confined to UUIDs; similar issues occur with Date and Binary
types in the XML serialization. The JSON serialization appears "immune" to
this spec ambiguity because primitive types always end up as
Boolean/String/Real/Undefined (in LLSD parlance); conversion to
Integer/UUID/Date/URI/Binary can only occur at the application level. The
Binary serialization appears "immune" to the spec ambiguity as well
(possibly edge cases if a NaN or Infinity was used for a Date?)
Thoughts?
- [vwrap] Parsing of invalid LLSD elements in XML Joshua Bell
- Re: [vwrap] Parsing of invalid LLSD elements in X… David W Levine
- Re: [vwrap] Parsing of invalid LLSD elements in X… Meadhbh Hamrick
- Re: [vwrap] Parsing of invalid LLSD elements in X… Meadhbh Hamrick
- Re: [vwrap] Parsing of invalid LLSD elements in X… Meadhbh Hamrick
- Re: [vwrap] Parsing of invalid LLSD elements in X… John Hurliman
- Re: [vwrap] Parsing of invalid LLSD elements in X… David W Levine
- Re: [vwrap] Parsing of invalid LLSD elements in X… Mark Lentczner
- Re: [vwrap] Parsing of invalid LLSD elements in X… Carlo Wood