[Mono-bugs] [Bug 647242] New: Generation of invalid query strings for WebResource.axd

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Oct 16 20:32:29 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=647242

https://bugzilla.novell.com/show_bug.cgi?id=647242#c0


           Summary: Generation of invalid query strings for
                    WebResource.axd
    Classification: Mono
           Product: Mono: Class Libraries
           Version: SVN
          Platform: x86-64
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Web
        AssignedTo: mhabersack at novell.com
        ReportedBy: Novell at meinersbur.de
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Description of Problem:

Web resources are encoded using Base64 and inserted into the HTML file like
this:
<script
src="/WebResource.axd?d=ZTkC+/UiDsbQChdWHWl/+4vi4Au3+rtYUjlZIe72PvU=&t=634227584730000000"
type="text/javascript"></script>

When retrieving this script, I get this:

System.FormatException: Invalid length.
  at (wrapper managed-to-native) System.Convert:InternalFromBase64String
(string,bool)
  at System.Convert.FromBase64String (System.String s) [0x00023] in
/home/meinersbur/Desktop/mono/mcs/class/corlib/System/Convert.cs:138 
  at System.Web.Handlers.AssemblyResourceLoader.DecryptAssemblyResource
(System.String val, System.String& asmName, System.String& resName) [0x00000]
in
/home/meinersbur/Desktop/mono/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs:100 
  at
System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest
(System.Web.HttpContext context) [0x0000e] in
/home/meinersbur/Desktop/mono/mcs/class/System.Web/System.Web.Handlers/AssemblyResourceLoader.cs:181 
  at System.Web.HttpApplication+<Pipeline>c__Iterator2.MoveNext () [0x00d81] in
/home/meinersbur/Desktop/mono/mcs/class/System.Web/System.Web/HttpApplication.cs:1344 
  at System.Web.HttpApplication.Tick () [0x00000] in
/home/meinersbur/Desktop/mono/mcs/class/System.Web/System.Web/HttpApplication.cs:914 


Actual Results:
System.FormatException: Invalid length.


Expected Results:
HTTP GET of js file


How often does this happen? 
Whenever the query string is invalid


Additional Information:
Base64 uses two character that should not be used directly as arguments: the
slash and plus-sign (according to http://en.wikipedia.org/wiki/Query_string).
The slash serves as path separator and the plus-sign represents a space.
Somewhere these characters get lost before decryption, hence the wrong number
of chars for Base64.

-- 
Configure bugmail: https://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