[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XSL Injection, is it possible?

Subject: Re: XSL Injection, is it possible?
From: "G. T. Stresen-Reuter" <tedmasterweb@xxxxxxx>
Date: Tue, 30 May 2006 13:16:54 +0100
xsl gt
On May 30, 2006, at 2:34 AM, Dimitre Novatchev wrote:

There are some applications that allow the end user to enter an XPath
expression (oh, why does this sound somewhat familiar to me :o)    ),
and the possibility for *XPath Injection* is a very real one.

This was precisely the concern I had but lacked the language to express. Of course our system uses user input in XPath expressions. I'll have to go back and quadruple check that the origin and format of the variables are what I expect them to be or I could have some problems!


But I do wonder, how would you circumvent an XPath expression such as this?

select="//page[@name = $pagename]/content[@lang = $lang]/block[@id = $block_id]"

It seems to me that if the variables aren't exactly what the system expects, no match is found and no results are returned. Passing * as the $pagename also doesn't have the expected result since it seems be seen as the literal asterisk and not as the wildcard character. Am I missing something?

Thanks in advance and for this feedback. Very helpful indeed!

Ted Stresen-Reuter

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Cast Your Vote

We need your help – Vote for DataDirect XML Products!

  • Best SOA or XML site

Winners and finalists announced at SOA World Conference in November.

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.