History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-3169
Type: Bug Bug
Status: Open Open
Priority: P2 P2
Assignee: Unassigned
Reporter: Sarah Allen
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

reversed query args when escaped

Created: 28/Nov/06 11:07 AM   Updated: 17/Oct/07 02:49 PM
Component/s: LFC - Data
Affects Version/s: 3.4
Fix Version/s: Future

Time Tracking:
Not Specified

File Attachments: 1. File echo.jsp (3 kb)
2. File test.lzx (1 kb)


Severity: Minor
Runtime: N/A
Fix in hand: False


 Description  « Hide
We tried escaping the XML text, which allowed it to appear
(although still with escaped characters)
<edittext id="request" width="${canvas.width - 20}" height="200" x="10"
bgcolor="white" multiline="true"
         text="&lt;echo action="echo"&gt;TEST&lt;/echo&gt;"/>

However, when we sent that as a query arg, like so...
<dataset name="dd" ondata="Debug.write(this);"
src="http://localhost:8080/diamond/dd"/>
<method name="sendRequest">
dd.setQueryString({ r : request.text });
dd.doRequest();
</method>

it reversed the query args in a bizarre fashion, like so...
ERROR: data source error for
 
http://localhost:8080/diamond/dd?gt;=&lt;/echo=&gt;TEST=&apos;=&apos;echo=&lt;echo action=&r=:
HTTP Status code: 505:Http Version Not Supported


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Sarah Allen - 28/Nov/06 11:07 AM
attaching test file

Henry Minsky - 28/Nov/06 08:46 PM
A fix would be in LzDataset:

function setQueryString( s ) {
    //@field String querystring: A string to be appended to the request that
    //the dataset makes.
    if ( typeof( s ) == "object" ){
        if (s instanceof LzParam){
            this.querystring = s.toString();
        } else {
            var p = new LzParam ( this );
 ! for ( var n in s ) {
 ! p.setValue( n, s[n], true );
 ! }


The third arg to setValue causes arg to be URL-escaped