From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MJVHm-000872-9w for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:25:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MJVHg-0007xT-4R for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:25:21 -0400 Received: from [199.232.76.173] (port=41925 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MJVHf-0007xG-UX for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:25:15 -0400 Received: from mail2.shareable.org ([80.68.89.115]:60221) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MJUtx-0001vW-UY for qemu-devel@nongnu.org; Wed, 24 Jun 2009 12:00:46 -0400 Date: Wed, 24 Jun 2009 17:00:39 +0100 From: Jamie Lokier Subject: Re: [Qemu-devel] [PATCH 01/11] QMP: Introduce specification file Message-ID: <20090624160039.GB14121@shareable.org> References: <20090623012811.53a62493@doriath> <20090623144521.GA614@snarc.org> <4A40FB11.8090100@redhat.com> <4A40FB26.2040702@us.ibm.com> <4A40FD1A.1040303@redhat.com> <4A40FE31.2010007@us.ibm.com> <4A40FFB0.2070905@redhat.com> <4A411FC5.7050701@us.ibm.com> <4A412339.5000109@redhat.com> <4A412659.1080803@us.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4A412659.1080803@us.ibm.com> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: ehabkost@redhat.com, jan.kiszka@siemens.com, dlaor@redhat.com, qemu-devel@nongnu.org, Luiz Capitulino , Avi Kivity , Vincent Hanquez Anthony Liguori wrote: > The odd thing about it is you still have to parse json in JavaScript > to avoid security problems. Parsing json in js seems to eliminate > 99% of the useness of it. I think this is mistaken. Last time I looked, you would check the whole string with a simple regexp to look for badness, and that confirms it's safe to eval the json. Good json always passes the regexp. Not that I've ever done any json :-) -- Jamie