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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsFeedbackFeedbackSsl and Captcha?Ssl and Captcha?
Previous
 
Next
New Post
8/23/2007 1:48 PM
 

smehrotra wrote

Adoucette - unfortunately, this problem with Captcha is a core issue rather than something which is being caused by the Feedback Module.
I traced it through the code and can tell you how to resolve it but it does require a recompile of the URLRewrite module.
If you think you can do this, then here are the steps:

a) Open up URLRewriteModule.vb (located under DNN455\Library\HttpModules\UrlRewrite) - I believe there is a project reference already to this if you open up your DNN 455 solution.

b) Scroll down to Line 348 where it reads If strURL <> "" Then

c) Change this line to the following
   If strURL.ToLower.Contains("captcha.aspx") Then
         'Don't do anything since this is a captcha URL
   ElseIf strURL.ToLower.StartsWith("https://") Then
        ' redirect to secure connection
        Response.Redirect(strURL, True)

 

The rest of the block should be left as is. That is to say the main change made is that you check for captcha first and then check whether the url starts with "https://"

I have tried this with my copy of 4.5.5 and it is working as expected. I am sure the core is aware of this too and will probably be fixed in the next release as it becomes available.

Once you've made these changes, remember to recompile.

 

thanx for the code,

but do you mean something like:

                    If strURL.ToLower.Contains("captcha.aspx") Then
                        'Don't do anything since this is a captcha URL
                    ElseIf strURL.ToLower.StartsWith("https://") Then
                        ' redirect to secure connection
                        Response.Redirect(strURL, True)
                    Else ' when switching to an unsecure page, use a clientside redirector to avoid the browser security warning
                        Response.Clear()
                        ' add a refresh header to the response
                        Response.AddHeader("Refresh", "0;URL=" & strURL)
                        ' add the clientside javascript redirection script
                        Response.Write("<html><head><title></title>")
                        Response.Write("<!-- <script language=""javascript"">window.location.replace(""" & strURL & """)</script> -->")
                        Response.Write("</head><body></body></html>")
                        ' send the response
                        Response.End()
                    End If

If you mean something else, is it possible that you provide the specific segment of code (the complete if-else-endif statements concerning this bug fix?

regards

 
New Post
8/23/2007 2:26 PM
 

Since this seems to involve re-compiling a core module (and I'm not capable -- or don't know how -- to do that), would one of you two be willing to email me the module -- if you end up compiling it for your own use?

Or, is there a standard way of getting updated core modules from a DNN CVS or module repository that I don't know about?

 

 
New Post
8/23/2007 2:40 PM
 

dkarantonis wrote

 smehrotra wrote

 

Adoucette - unfortunately, this problem with Captcha is a core issue rather than something which is being caused by the Feedback Module.
I traced it through the code and can tell you how to resolve it but it does require a recompile of the URLRewrite module.
If you think you can do this, then here are the steps:

a) Open up URLRewriteModule.vb (located under DNN455\Library\HttpModules\UrlRewrite) - I believe there is a project reference already to this if you open up your DNN 455 solution.

b) Scroll down to Line 348 where it reads If strURL <> "" Then

c) Change this line to the following
   If strURL.ToLower.Contains("captcha.aspx") Then
         'Don't do anything since this is a captcha URL
   ElseIf strURL.ToLower.StartsWith("https://") Then
        ' redirect to secure connection
        Response.Redirect(strURL, True)

 

The rest of the block should be left as is. That is to say the main change made is that you check for captcha first and then check whether the url starts with "https://"

I have tried this with my copy of 4.5.5 and it is working as expected. I am sure the core is aware of this too and will probably be fixed in the next release as it becomes available.

Once you've made these changes, remember to recompile.

 

 

thanx for the code,

but do you mean something like:

                    If strURL.ToLower.Contains("captcha.aspx") Then
                        'Don't do anything since this is a captcha URL
                    ElseIf strURL.ToLower.StartsWith("https://") Then
                        ' redirect to secure connection
                        Response.Redirect(strURL, True)
                    Else ' when switching to an unsecure page, use a clientside redirector to avoid the browser security warning
                        Response.Clear()
                        ' add a refresh header to the response
                        Response.AddHeader("Refresh", "0;URL=" & strURL)
                        ' add the clientside javascript redirection script
                        Response.Write("")
                        Response.Write("")
                        Response.Write("")
                        ' send the response
                        Response.End()
                    End If

If you mean something else, is it possible that you provide the specific segment of code (the complete if-else-endif statements concerning this bug fix?

regards

 

Yes, that is what I meant. What I had posted before was just the lines that needed changing, but thanks for posting the whole section of code.

Sanjay


AcuitiDP - Oracle Data Provider for DotNetNuke
 
New Post
8/24/2007 3:58 AM
 

Hi Sanjay,

I have tried the code mentioned above many times and is seems like, when the DNN is loaded, the default page keeps refreshing all the time (the code goes to the 'Else' segment of the IF-ELSE IF-ELSE-END IF statement). So, the DNN keeps refreshing the default page ... forever.

I have also tried to enter the following code (note that the difference with the above code is that the "captha" search is performed on na outer IF-ENDIF statement):

                    If strURL.ToLower.Contains("captcha.aspx") Then
                        'Don't do anything since this is a captcha URL
                        If strURL.ToLower.StartsWith("https://") Then
                            ' redirect to secure connection
                            Response.Redirect(strURL, True)
                        Else ' when switching to an unsecure page, use a clientside redirector to avoid the browser security warning
                            Response.Clear()
                            ' add a refresh header to the response
                            Response.AddHeader("Refresh", "0;URL=" & strURL)
                            ' add the clientside javascript redirection script
                            Response.Write("<html><head><title></title>")
                            Response.Write("<!-- <script language=""javascript"">window.location.replace(""" & strURL & """)</script> -->")
                            Response.Write("</head><body></body></html>")
                            ' send the response
                            Response.End()
                        End If
                    End If

and now i am losing the https redirect on my SSL enabled (IsSecure = yes) pages.

Is there something i am doing wrong, or is there some issue concerning the code?

regards

 
New Post
8/24/2007 4:09 AM
 

adoucette wrote

Since this seems to involve re-compiling a core module (and I'm not capable -- or don't know how -- to do that), would one of you two be willing to email me the module -- if you end up compiling it for your own use?

Or, is there a standard way of getting updated core modules from a DNN CVS or module repository that I don't know about?

 

Hi adoucette,

when the issue with the code is resolved, i can send you the rebuild module.

In fact, the only thing that i should send you is the DotNetNuke.HttpModules.UrlRewrite.dll assembly.

Since the change concerns only the implementation of a function, this is all you want.

You should copy the DotNetNuke.HttpModules.UrlRewrite.dll inside <Your DNN Installation path>\WebSite\Bin and overwrite the previous one.

I will also need your e-mail in order to send it.

If someone has a better idea for sending the rebuild module let us know.

regards

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsFeedbackFeedbackSsl and Captcha?Ssl and Captcha?


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