Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Forgot Password not working in DNN5Forgot Password not working in DNN5
Previous
 
Next
New Post
3/10/2009 7:41 PM
 

These are stock ISA rules (HTTP Filter) on a Small Business Server 2003 Premium R2. So anyone with the same environment will run into this problem. The HTTP filter can either be on or off with no other options. I'd rather have it on.

This should be an easy fix.

Looking at the source in Login.ascx.vb, I find:

        Private Sub cmdPassword_Click(ByVal sender As System.Object, ByVal e As EventArgs) Handles cmdPassword.Click
            Dim ReturnUrl As String = NavigateURL()
            If Not String.IsNullOrEmpty(Request.QueryString("returnurl")) Then
                ReturnUrl = Request.QueryString("returnurl")
            End If
            ReturnUrl = HttpUtility.UrlEncode(Request.RawUrl)

            Response.Redirect(NavigateURL("SendPassword", "returnurl=" + ReturnUrl), True)
        End Sub
 

In the above code block, the first two statements assigning a value to ReturnUrl are useless as ReturnUrl will be overwritten in the following step. That looks like either a coding error (using RawUrl) or bad housekeeping by not deleting useless code. Either way, it needs to be looked at.

        Private Sub cmdRegister_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdRegister.Click
            If PortalSettings.UserRegistration <> PortalRegistrationType.NoRegistration Then
                Dim ReturnUrl As String = NavigateURL()
                If Not String.IsNullOrEmpty(Request.QueryString("returnurl")) Then
                    ReturnUrl = Request.QueryString("returnurl")
                End If
                ReturnUrl = HttpUtility.UrlEncode(ReturnUrl)

                If PortalSettings.UserRegistration = PortalRegistrationType.PublicRegistration Then
                    'Pass return url to register
                    Response.Redirect(RegisterURL(HttpUtility.UrlEncode(ReturnUrl), Null.NullString), True)
                ElseIf PortalSettings.UserRegistration = PortalRegistrationType.VerifiedRegistration Then
                    'Pass return url to register as original url  and return to this control to login after regsitration
                    Response.Redirect(RegisterURL(HttpUtility.UrlEncode(Request.RawUrl), Null.NullString), True)
                End If
            End If
        End Sub
 

In this event handler, UrlEncode can be called twice on the same URL. Removing the second call to UrlEncode would avoid that and improve efficiency by eliminating a redundant call. Like so:

        Private Sub cmdRegister_Click(ByVal sender As Object, ByVal e As EventArgs) Handles cmdRegister.Click
            If PortalSettings.UserRegistration <> PortalRegistrationType.NoRegistration Then
                Dim ReturnUrl As String = NavigateURL()
                If Not String.IsNullOrEmpty(Request.QueryString("returnurl")) Then
                    ReturnUrl = Request.QueryString("returnurl")
                End If
                ReturnUrl = HttpUtility.UrlEncode(ReturnUrl)

                If PortalSettings.UserRegistration = PortalRegistrationType.PublicRegistration Then
                    'Pass return url to register
                    Response.Redirect(RegisterURL(ReturnUrl, Null.NullString), True)
                ElseIf PortalSettings.UserRegistration = PortalRegistrationType.VerifiedRegistration Then
                    'Pass return url to register as original url  and return to this control to login after regsitration
                    Response.Redirect(RegisterURL(HttpUtility.UrlEncode(Request.RawUrl), Null.NullString), True)
                End If
            End If
        End Sub
 

IMHO, these are coding errors and easy to fix, so I can't see why they wouldn't be fixed.

 
New Post
3/11/2009 7:57 AM
 

Hi Henri,

Your point is valid; I do not see why this can't be corrected on the DotNetNuke side.  I hope you do not mind my posting the above code to the work item, to speed remediation.

Brandon


Brandon Haynes
BrandonHaynes.org
 
New Post
3/11/2009 12:02 PM
 

Charles just pressed the checked in button :).



Alex Shirley


 
New Post
12/14/2009 2:37 AM
 

Hello,

I have also encountered the same problem. Are there any updates on this one? The fix will be included in what version?

Thanks.

 
New Post
12/14/2009 5:09 AM
 

if it is checked in it will be including in upcomming DNN 5.2.1


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Forgot Password not working in DNN5Forgot Password not working in DNN5


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out