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 Bug Reports (Closed)
 FIXED: Quotes in members search are doubled
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 24 August 2006 :  21:01:18  Show Profile
On the members page, if you enter a search term with a single quote and submit, the single quote is doubled in the text box.

The search term is put through the chkstring() function, to be used in the SQL query, but it is also being used for the display text.

Solution is to store the search term that is to be displayed, in another variable that is not put through chkstring() function.

In members.asp, find lines 81-84:
SearchName = trim(chkString(Request("M_NAME"),"SQLString"))
if SearchName = "" then
	SearchName = trim(chkString(Request.Form("M_NAME"),"SQLString"))
end if


Change it to this:
SearchName = trim(Request("M_NAME"))
if SearchName = "" then
	SearchName = trim(Request.Form("M_NAME"))
end if
SearchNameDisplay = SearchName
SearchName = chkString(SearchName, "sqlstring")


Find line 279:
"                <input type=""text"" name=""M_NAME"" value=""" & SearchName & """></font></td>" & vbNewline & _


And change it to this:
"                <input type=""text"" name=""M_NAME"" value=""" & SearchNameDisplay & """></font></td>" & vbNewline & _
<

Support Snitz Forums

Edited by - Davio on 26 September 2006 05:45:27

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 24 August 2006 :  21:01:42  Show Profile
Fixed in 3.4.06.<

Support Snitz Forums
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 25 August 2006 :  05:15:29  Show Profile
Should SearchNameDisplay not be passed through chkString anyway, using "display" rather than "sqlstring"?

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Davio
Development Team Member

Jamaica
12217 Posts

Posted - 25 August 2006 :  08:45:32  Show Profile
Why?

I saw that but didn't know why we are doing that. We are just displaying what the user entered.
Or maybe I am missing something?<

Support Snitz Forums
Go to Top of Page
  Previous Topic Topic Next Topic  
 Forum Locked  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.16 seconds. Powered By: Snitz Forums 2000 Version 3.4.07