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

Meadhbh Hamrick <ohmeadhbh@gmail.com> Wed, 31 March 2010 22:32 UTC

Return-Path: <ohmeadhbh@gmail.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 B2EEC3A6A59; Wed, 31 Mar 2010 15:32:49 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 1.038
X-Spam-Level: *
X-Spam-Status: No, score=1.038 tagged_above=-999 required=5 tests=[AWL=-0.093, BAYES_50=0.001, DNS_FROM_OPENWHOIS=1.13]
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 MjRVh7hUGfqV; Wed, 31 Mar 2010 15:32:49 -0700 (PDT)
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.25]) by core3.amsl.com (Postfix) with ESMTP id BDA033A6978; Wed, 31 Mar 2010 15:32:48 -0700 (PDT)
Received: by qw-out-2122.google.com with SMTP id 9so197330qwb.31 for <multiple recipients>; Wed, 31 Mar 2010 15:33:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:received:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=Vfv5HDfHmT7jByo8MMvKesqiPK3hvL0CDbbtpdWglzk=; b=nF88WtPdJoAH/wz4AExP9JZzpGu9Z4alQ2mwXe7tcg7rsCD3N4x45RTI5XpmTWwPk4 AiAXIvV8O5hGczazkzXec8fBW7XG9Ed/GITNTOfsR84mhPXsH3F9xakCpPPRmpMkPW37 FxYR9VZ6tYls79QEDRPsrM+mqZsarTXXQGUbU=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=jtFBTDo/4Pbrb06OmKqWcS2B84MtXLZPudEi/Pg5DMXmtLQXsLYZX/SDxr8M7Kk0tR atsFE/d5jWDgCrR5CPgXcg/d6qzd00RE7yqezalH4wOxb4cEBCB+NFez8d3ycY7RubYV /tRGQadxfqVY1FGA2gWSPwuexAGJJMVL9H97w=
MIME-Version: 1.0
Received: by 10.229.49.78 with HTTP; Wed, 31 Mar 2010 15:32:59 -0700 (PDT)
In-Reply-To: <OF85384387.09AA3E02-ON852576F7.00797FBF-852576F7.007A36F4@us.ibm.com>
References: <q2uf72742de1003311453y212ff98ay13d6f70d77565536@mail.gmail.com> <OF85384387.09AA3E02-ON852576F7.00797FBF-852576F7.007A36F4@us.ibm.com>
From: Meadhbh Hamrick <ohmeadhbh@gmail.com>
Date: Wed, 31 Mar 2010 15:32:59 -0700
Received: by 10.229.216.76 with SMTP id hh12mr170575qcb.47.1270074800163; Wed, 31 Mar 2010 15:33:20 -0700 (PDT)
Message-ID: <j2zb325928b1003311532z75e4be0cr5ce483a55dfdf4a5@mail.gmail.com>
To: David W Levine <dwl@us.ibm.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: vwrap@ietf.org, vwrap-bounces@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: Wed, 31 Mar 2010 22:32:49 -0000

hmm. this case is actually covered in the draft. i'll have to recode
some things if we change it.
--
meadhbh hamrick * it's pronounced "maeve"
@OhMeadhbh * http://meadhbh.org/ * OhMeadhbh@gmail.com



On Wed, Mar 31, 2010 at 3:14 PM, David W Levine <dwl@us.ibm.com> wrote:
>
> vwrap-bounces@ietf.org wrote on 03/31/2010 05:53:25 PM:
>
>> [image removed]
>>
>> [vwrap] Parsing of invalid LLSD elements in XML
>>
>> Joshua Bell
>>
>> to:
>>
>> vwrap
>>
>> 03/31/2010 05:53 PM
>>
>> Sent by:
>>
>> vwrap-bounces@ietf.org
>>
>> 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?
>>
>
>
> My fairly strong preference is for choice (3). Choice (2) allows an error to
> propagate
> in ways which strikes me as highly undesirable. Choice (1) stops the error
> from propagating
> but likely at the expense of generating the error detection some distance
> from a good place
> to actually handle the error. The element is invalid, the elements framing
> it (in this example,
> the map) is valid, and allows the error to be stated quite explicitly.
>
>
> - David
> ~ Zha
>
>
> _______________________________________________
> vwrap mailing list
> vwrap@ietf.org
> https://www.ietf.org/mailman/listinfo/vwrap
>
>