Forum Home Forum Home > Legacy Products > SalesCart Standard / PRO / SQL
  New Posts New Posts RSS Feed - checkpost.asp sub question
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum Lockedcheckpost.asp sub question

 Post Reply Post Reply
Author
Message
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Topic: checkpost.asp sub question
    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.
Back to Top
lleemon View Drop Down
Groupie
Groupie


Joined: March/16/04
Location: United States
Status: Offline
Points: 41
Post Options Post Options   Thanks (0) Thanks(0)   Quote lleemon Quote  Post ReplyReply Direct Link To This Post Posted: July/25/05 at 12:06pm
Figured it out.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

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

Copyright 2015 by ComCity® LLC and SalesCart™.  All Rights Reserved