Return-Path: Delivered-To: apmail-incubator-jspwiki-dev-archive@minotaur.apache.org Received: (qmail 33635 invoked from network); 7 Mar 2010 17:28:23 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 7 Mar 2010 17:28:23 -0000 Received: (qmail 37422 invoked by uid 500); 7 Mar 2010 17:28:02 -0000 Delivered-To: apmail-incubator-jspwiki-dev-archive@incubator.apache.org Received: (qmail 37373 invoked by uid 500); 7 Mar 2010 17:28:02 -0000 Mailing-List: contact jspwiki-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jspwiki-dev@incubator.apache.org Delivered-To: mailing list jspwiki-dev@incubator.apache.org Received: (qmail 37365 invoked by uid 99); 7 Mar 2010 17:28:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Mar 2010 17:28:02 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of janne.jalkanen@ecyrd.com designates 193.64.5.122 as permitted sender) Received: from [193.64.5.122] (HELO mail.ecyrd.com) (193.64.5.122) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Mar 2010 17:27:54 +0000 Received: from [10.0.1.2] (dsl-roibrasgw1-fe55de00-15.dhcp.inet.fi [80.222.85.15]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.ecyrd.com (Postfix) with ESMTPSA id 6D00197C1FE for ; Sun, 7 Mar 2010 19:27:18 +0200 (EET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1077) Subject: Re: svn commit: r917390 - in /incubator/jspwiki/trunk: ./ src/java/org/apache/wiki/ src/java/org/apache/wiki/plugin/ src/java/org/apache/wiki/preferences/ src/java/org/apache/wiki/rpc/json/ src/java/org/apache/wiki/tags/ src/java/org/apache/wiki/ui/ From: Janne Jalkanen In-Reply-To: Date: Sun, 7 Mar 2010 19:27:21 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <5A9FEA5B-4D4D-43CB-B77D-9F5E1D8AD1D4@ecyrd.com> References: <15cc92001003021338x81afd82oaa5a5ccaae0b86e4@mail.gmail.com> <20100303162113.GA16369@ecyrd.com> <266B732F-3495-46B7-85A0-D96C2948A9C9@ecyrd.com> <4AB9BB4D-7246-4706-8131-B6FA6C4A652B@ecyrd.com> <93C8DEA8-7C06-4985-91D7-48BFBC8CAF94@ecyrd.com> To: jspwiki-dev@incubator.apache.org X-Mailer: Apple Mail (2.1077) X-Virus-Checked: Checked by ClamAV on apache.org On 7 Mar 2010, at 17:40, Andrew Jaquith wrote: >> Can you detail exactly which security issue is raised by this? >=20 > I'm worried about cross-site scripting. It should only be possible to > source scripts that are stored on the server. That's why I want to > check the requested resource against the ServletContext resource list. > This check provides protection against plugins that are written > maliciously, poorly or without security in mind. I don't think we can > guarantee that every plugin will behave the way we expect -- even the > ones that may someday be part of JSPWiki -- so this "origin check" > provides a last line of defense. ...but you can include the script already *directly*, if you want to = make the damage. Also, the admin needs to make the call whether they want to install a = plugin or not. So it's not our problem. >> After all, plugins are a) already running at the exact same rights as = the rest of JSPWiki, >=20 > That's true, but sooner or later we're going to get it to work in a > security manager -- that's been a JIRA issue forever. And by "we" I > mean "me", because nobody else is gonna do it. At some point, what > JSPWiki (and third party JARs) can do will be more constrained when > it's running in a security manager. But this issue doesn't relate to > my real concern -- XSS. But we don't have it now. Besides, any plugin can write XSS code = directly on the page. >=20 >> I just simply cannot see that your method provides ANY added = security, and it simply adds a TON of implementational complexity, pain = to the developer, and still does not resolve the dynamic problem. >=20 > Personal opinion: I don't see it as particularly complex. I'm also > offering to do the work -- in case that wasn't clear -- and I work > cheap. :) But I do see that as a plugin writer, *I* need to essentially stick to = 2.8. If adding dynamic code with plugins is not possible, I have no = reason whatsoever to use 3.0 anywhere. > On the security front, I hope you can understand that my concerns > about XSS are well-founded. Here is a cheat sheet: > http://ha.ckers.org/xss.html I *do* know about XSS. It's my opinion that as long as a plugin can = write