Print Page | Close Window

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.
Printed Date: September/29/23 at 2:43pm
Software Version: Web Wiz Forums 11.04 -

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

Basically, get domain name into two variables:
ServerURL = ""
ServerURL2 = ""

The next section gets just the domain name from the url passed and based on length of the ServerURL it gets that info:
TestURL = ""
TestURL = ""
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

     '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
           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.

Posted By: lleemon
Date Posted: July/25/05 at 12:06pm
Figured it out.

Print Page | Close Window

Forum Software by Web Wiz Forums® version 11.04 -
Copyright ©2001-2015 Web Wiz Ltd. -