[Mono-bugs] [Bug 571365] New: Incorrect JSON Responses

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Jan 16 09:57:38 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=571365

http://bugzilla.novell.com/show_bug.cgi?id=571365#c0


           Summary: Incorrect JSON Responses
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: alexmipego at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:
ASP.Net AJAX stack assumes all JSON responses will start with a { d: datahere }
container. This is to help prevent XSS attacks and afaik the release scripts
included in a web page hava a failsafe to handle it if the "d" isn't present.
However, if running with ASP.Net debug enabled (<compilation debug=true>) the
debug scripts will be included instead and the "d" presence will be enforced.

Mono 2.4.x is working correctly but since revision 146546 it stopped working
because that commit actually removes the "d" from the responses.

Steps to reproduce the problem:
1. Any ASP.Net Ajax application
2. Call a PageMethod/WebMethod.
3. Try returning a anonimous object from the page method like:
new { d = "hello world" }


Actual Results:
The callbacks aren't called and inspecting with Firebug will reveal the reason
to be the lacking "d".

However, if you call the method returning the "d" (like in step 3) the
callbacks and everything else will work like a charm.

Expected Results:
The "d" to be included in all results.

How often does this happen? 
Always.

Additional Information:
I don't understand how this could happen, but the commit log for that revision
(146546) states that it was breaking some applications.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list