error in UrlRewriter.cs.

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
5/16/2013 2:33:21 PM
Gravatar
Total Posts 46

error in UrlRewriter.cs.

hi, joe.

below code in  UrlRewriter.cs in line 323

 

//////////////////////////////////////////////////////////////////////////////////////////////////////////

              // get any additional params besides pageid
                string separator = string.Empty;
                foreach (string key in app.Request.QueryString.AllKeys)
                {
                    if (key != "pageid")
                    {
                        originalQueryString.Append( separator + key + "="
                            + app.Request.QueryString.Get(key)); // Should be HttpUtility.UrlEncode(app.Request.QueryString.Get(key), System.Text.Encoding.UTF8));
                        
                        if(separator.Length == 0)separator = "&";

                    }
                }

///////////////////////////////////////////////////////////////////////////////////////////////////////////

for example:

if don't use HttpUtility.UrlEncode:

below param:

notify_id=RqPnCoPT3K9%252Fvwbh3I739xaCNUyHkrikGC%252F3Q2PGJ9s0wcZGEDmsdFEC5W54lMid8VVq

after  UrlRewriter will become

notify_id=RqPnCoPT3K9%2fvwbh3I739xaCNUyHkrikGC%2f3Q2PGJ9s0wcZGEDmsdFEC5W54lMid8VVq

​lost "52"

​After use HttpUtility.UrlEncode then will ok.

If you can get rid of param pageid from app.Request.QueryString directly,  don't use foreach ... then HttpUtility.UrlEncode will be more better.

Thanks.

 

 

 

5/17/2013 10:38:36 AM
Gravatar
Total Posts 18439

Re: error in UrlRewriter.cs.

I have committed your suggested fix to the source code repository.

Thanks,

Joe

You must sign in to post in the forums. This thread is closed to new posts.