Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 DEV-Group
 DEV Discussions (General)
 Fix for broken target querystrings (login.asp)
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Nertz
Junior Member

Canada
341 Posts

Posted - 22 March 2006 :  15:30:55  Show Profile  Reply with Quote
Not sure if this is the right place to post this little tidbit, but I thought it may be useful to others who may have run into a similar situation such as in this post. I just did too, searched here and wasn't able to find a fix, so I just created one. Login.asp from base code 3.4.xx will break and truncate target script querystrings at the first "&" character.

The following fix is my solution I implemented in my forums that will allow multiple query strings to the target script when redirected through login.asp.

1) approx line 53, comment or delete this line of code:
strTarget = trim(chkString(request("target"),"SQLString"))


2) appox. line 65, find this line of code:
	if strLoginStatus = 1 then


3) Immediately above it, insert this line of code:
	strTarget = trim(chkString(request.form("target"),"SQLString"))


4) approx lines 84-87, find these lines of code:
		WriteFooter
		Response.End
	end if
end if


5) Between the two "end if" statements, insert the following code:
else
   tmpTarget = trim(chkString(request.ServerVariables("Query_String"),"SQLString"))
   if inStr(tmpTarget,"target=") then 
   	strTarget = (split(tmpTarget,"target=",-1,1))(1)
   else
   	strTarget = ""
   end if



Moderators: feel free to move this post where appropriate.

cheers,
Nat

[update 20060401] Thanks to leatherlips who discovered a bug if login.asp was called without a target string. see this post. code above step 5 updated. [/update]<

Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers
that use our children unjustly as "instruments" of power.


www.fathers-4-justice-canada.ca

Edited by - Nertz on 01 April 2006 14:01:13
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.07 seconds. Powered By: Snitz Forums 2000 Version 3.4.07