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

Mark Lentczner <markl@lindenlab.com> Thu, 01 April 2010 22:51 UTC

Return-Path: <markl@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 3A9063A68E5 for <vwrap@core3.amsl.com>; Thu, 1 Apr 2010 15:51:26 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.968
X-Spam-Level:
X-Spam-Status: No, score=0.968 tagged_above=-999 required=5 tests=[AWL=-0.163, 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 rpn5RHI5jr5V for <vwrap@core3.amsl.com>; Thu, 1 Apr 2010 15:51:25 -0700 (PDT)
Received: from mail-gx0-f220.google.com (mail-gx0-f220.google.com [209.85.217.220]) by core3.amsl.com (Postfix) with ESMTP id 73F0F3A6877 for <vwrap@ietf.org>; Thu, 1 Apr 2010 15:51:25 -0700 (PDT)
Received: by gxk20 with SMTP id 20so1178102gxk.12 for <vwrap@ietf.org>; Thu, 01 Apr 2010 15:51:54 -0700 (PDT)
Received: by 10.100.244.24 with SMTP id r24mr3442818anh.216.1270162314339; Thu, 01 Apr 2010 15:51:54 -0700 (PDT)
Received: from nil.lindenlab.com ([38.99.52.137]) by mx.google.com with ESMTPS id 5sm445097yxd.35.2010.04.01.15.51.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 01 Apr 2010 15:51:53 -0700 (PDT)
Content-Type: text/plain; charset=us-ascii
Mime-Version: 1.0 (Apple Message framework v1078)
From: Mark Lentczner <markl@lindenlab.com>
In-Reply-To: <q2uf72742de1003311453y212ff98ay13d6f70d77565536@mail.gmail.com>
Date: Thu, 1 Apr 2010 15:51:51 -0700
Content-Transfer-Encoding: quoted-printable
Message-Id: <6DA5BF47-FF62-4843-81D8-C354E36683E1@lindenlab.com>
References: <q2uf72742de1003311453y212ff98ay13d6f70d77565536@mail.gmail.com>
To: vwrap <vwrap@ietf.org>
X-Mailer: Apple Mail (2.1078)
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 22:51:26 -0000

On Apr 1, 2010, at 9:26 AM, David W Levine wrote:
> I *think* we are talking about a very special case here.

This seems at the core to me. We are asking about cases where the serialization rules have been violated. If, for example, the uuid value was correct but the closing uuid tag misspelled "</wwid>", then XML processing would have required that the whole XML document to be rejected. Seems to me that the case of the text inside the uuid element not conforming to the UUID syntax is the same: The entire LLSD value should be rejected. 

As for error reporting, I note that even though XML processing demands that the whole document be rejected, parsers are still able to report specific and helpful error messages at the receiving side. The same should be true of LLSD processors.

	- Mark

P.S.: Small bit of XML pedantry:

On Mar 31, 2010, at 2:53 PM, Joshua Bell wrote:
> ... 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>

Actually, that is well-formed XML just as it sits. There is no requirement for an XML prolog where XML doesn't mandate one.



Mark Lentczner
Sr. Systems Architect
Technology Integration
Linden Lab

markl@lindenlab.com

Zero Linden
zero.linden@secondlife.com