Welcome, Guest ( Customer Panel | Login )




 All Forums
 VPCart Forum
 Problems and bugs
 Apostrophe in customer lastname login
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

niallpm
Starting Member

Ireland
8 Posts

Posted - May 26 2010 :  10:24:44  Show Profile  Reply with Quote
VPASP V7 around line 2227 in shop$db.asp

templastname=replace(lastname,"'","''")

This replaces apostrophe with double apostrophe in the Lastname field entry during customer login.

Then around line 2234

sql=sql & whereok & " lastname='" & tosql(templastname,"Text") & "'"

Which calls the function tosql which replaces apostrophe with double apostrophe again.

The end result is if your customer is trying to login with lastname O'Sullivan (for example), VPASP will query the field entry O''''Sullivan against the DB and their login will fail.

I fixed this by replacing the line:

sql=sql & whereok & " lastname='" & tosql(templastname,"Text") & "'"

with

sql=sql & whereok & " lastname='" & templastname & "'"

Hope this is useful.

  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000
0 Item(s)
$0.00