Re: [vwrap] Parsing of invalid LLSD elements in XML

John Hurliman <jhurliman@jhurliman.org> Thu, 01 April 2010 06:23 UTC

Return-Path: <jhurliman@jhurliman.org>
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 958973A6872 for <vwrap@core3.amsl.com>; Wed, 31 Mar 2010 23:23:07 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.753
X-Spam-Level: *
X-Spam-Status: No, score=1.753 tagged_above=-999 required=5 tests=[BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13, FM_FORGED_GMAIL=0.622]
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 0JDJuQ1-1Eci for <vwrap@core3.amsl.com>; Wed, 31 Mar 2010 23:23:04 -0700 (PDT)
Received: from mail-yw0-f200.google.com (mail-yw0-f200.google.com [209.85.211.200]) by core3.amsl.com (Postfix) with ESMTP id 7D4213A6765 for <vwrap@ietf.org>; Wed, 31 Mar 2010 23:23:04 -0700 (PDT)
Received: by ywh38 with SMTP id 38so707472ywh.29 for <vwrap@ietf.org>; Wed, 31 Mar 2010 23:23:33 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.90.90.16 with HTTP; Wed, 31 Mar 2010 23:23:33 -0700 (PDT)
In-Reply-To: <q2uf72742de1003311453y212ff98ay13d6f70d77565536@mail.gmail.com>
References: <q2uf72742de1003311453y212ff98ay13d6f70d77565536@mail.gmail.com>
Date: Wed, 31 Mar 2010 23:23:33 -0700
Received: by 10.90.59.28 with SMTP id h28mr892671aga.85.1270103013425; Wed, 31 Mar 2010 23:23:33 -0700 (PDT)
Message-ID: <x2ta072c1ba1003312323pd0dad285p5ebc15b3ee179e15@mail.gmail.com>
From: John Hurliman <jhurliman@jhurliman.org>
To: Joshua Bell <josh@lindenlab.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: vwrap@ietf.org
Subject: Re: [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: Thu, 01 Apr 2010 06:23:08 -0000

How are (2) and (3) different in practice? My understanding is that
the undefined value has conversions to string, uuid, date, etc and
will convert as the default value for each type.

I think (2) is the current behavior of OpenMetaverse.StructuredData
but it can be changed in the future.

John

On Wed, Mar 31, 2010 at 2:53 PM, Joshua Bell <josh@lindenlab.com> wrote:
> 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 mailing list
> vwrap@ietf.org
> https://www.ietf.org/mailman/listinfo/vwrap
>
>