Canadian SIN uses wrong variable ($sin rather than $sinstring)

Dave Kinchlea - September 17, 2009 - 20:31
Project:Social Insurance Number (CCK)
Version:6.x-2.6
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:active
Description

When my own SIN number wouldn't validate as a default value, I knew something was up :-)

This patch fixes the simple error and adds some watchdog support as well to assist with stupid user tricks (only invalid numbers are written to the log, still probably ought to be an option as is a slight security problem, no time right now however.

In any case, the code currently sets $sinstring but uses $sin, simple fix was to set $sin instead.

!   $sin = trim($sinstring);
+   $sinstring = trim($sinstring);

AttachmentSize
sin.ca_.inc_.patch1.3 KB
 
 

Drupal is a registered trademark of Dries Buytaert.