checkpost.asp sub question
Printed From: SalesCart
Category: Legacy Products
Forum Name: SalesCart Standard / PRO / SQL
Forum Description: All questions pertaining to SalesCart Standard, PRO and SQL should be posted here.
URL: http://forum.salescart.com/forum/forum_posts.asp?TID=387
Printed Date: November/23/24 at 6:01pm Software Version: Web Wiz Forums 11.04 - http://www.webwizforums.com
Topic: checkpost.asp sub question
Posted By: lleemon
Subject: checkpost.asp sub question
Date Posted: July/25/05 at 11:57am
Just trying out the postpone option on the form element and get it to work on one site but not on another but really not sure why. After looking into this I find the routine checkReferer in file checkpost.asp. My question is, the way this is setup, wouldn't it be wrong everytime?
Request.ServerVariables("HTTP_REFERER") is http://www.domain.com/sample.asp
Basically, get domain name into two variables:
ServerURL = "http://www.domain.com"
ServerURL2 = "https://www.domain.com"
The next section gets just the domain name from the url passed and based on length of the ServerURL it gets that info:
TestURL = "http://www.domain.com"
TestURL = "http://www.domain.com/"
Then it checks to see if strings are different.
Function checkReferer()
'Get Name/Address of this Server
ServerURL="http://" + Request.ServerVariables("SERVER_NAME")
ServerURL2="https://" + Request.ServerVariables("SERVER_NAME")
'Find length of Name/Address of this Servers URL
CheckLength=len(ServerURL)
CheckLength2=len(ServerURL2)
'Make the URL to Test
TestURL=left(Request.ServerVar iables("HTTP_REFERER"),CheckLength)
TestURL2=left(Request.ServerVa riables("HTTP_REFERER"),CheckLength2)
If TestURL <> ServerURL and TestURL2 <> ServerURL2 Then
checkReferer = 0
Else
checkReferer = 1
End If
End Function
|
Wouldn't TestURL2 always be wrong if your not coming from a secure (https) location? And then TestURL would be wrong if coming from a secure location?
Needs some clarification on this one.
Thanks.
|
Replies:
Posted By: lleemon
Date Posted: July/25/05 at 12:06pm
|