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)
 V33(.03) BUG in user name containing single-quotes
 Forum Locked  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

jlcox
Starting Member

7 Posts

Posted - 23 August 2001 :  19:32:14  Show Profile
If a user registers using a name containing a single-quote, e.g. "d'Arcy" a SQL syntax error will occur. One option is to check for single-quotes right off the bat and disallow this. another option is to allow it, but escape all single-quotes. The following fix takes the latter approach.

Fixes:

in inc_functions.asp
change line 1102 in function chkForumModerator from
strSql = strSql & " AND me.M_NAME = '" & fMember_Name & "'"

to

strSql = strSql & " AND me.M_NAME = '" & chkString(fMember_Name,"SQLString") & "'"

also change line 2022 in function getMemberNumber from

strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & fUser_Name & "'"

to

strSql = strSql & " WHERE " & strDBNTSQLName & " = '" & chkString(fUser_Name,"SQLString") & "'"

in function chkUser the name and password are finally checked for single-quotes, closing the door well after the horse has left the barn

change

if rsCheck.BOF or rsCheck.EOF or not(ChkQuoteOk(fName)) or not(ChkQuoteOk(fPassword)) then

to

if rsCheck.BOF or rsCheck.EOF then

similar fix in chkUser2, line 946.

in register.asp

line 82, change

strSql = strSql & " WHERE M_NAME = '" & Trim(Request.Form("Name")) &"'"

to

strSql = strSql & " WHERE M_NAME = '" & chkString(Trim(Request.Form("Name")),"SQLString") &"'"

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 07 November 2001 :  17:02:16  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
Was this fixed? I remember someone with a quote (') in there name on one of my forums and no trouble....

---------------
-Da_Stimulator
Stims Snitz Test area - Running 3.3.03, 4 beta, and Huw's modified code
Need a Mod? Check out the Mod Resource
Go to Top of Page

Da_Stimulator
DEV Team Forum Moderator

USA
3373 Posts

Posted - 07 November 2001 :  23:01:04  Show Profile  Send Da_Stimulator an AOL message  Send Da_Stimulator a Yahoo! Message
fixed for 3.4

---------------
-Da_Stimulator
Stims Snitz Test area - Running 3.3.03, 4 beta, and Huw's modified code
Need a Mod? Check out the Mod Resource
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.11 seconds. Powered By: Snitz Forums 2000 Version 3.4.07