Commit 1e2c68ff authored by Obsidian Design's avatar Obsidian Design

#885972 by eyenology: CC Numbers were not obfuscated when CC Data was...

#885972 by eyenology: CC Numbers were not obfuscated when CC Data was collected via a fieldset.  This change properly obfuscates CC Data when stored in a fieldset.
parent 355f0401
......@@ -430,7 +430,7 @@ function authorizenetwebform_process($step, $node, $form, $form_state) {
$cc = $submitted[$cids[$flipped_map['x_card_num']]];
$cclen = strlen($cc);
$end = $cclen - 4;
$anon_cc = preg_replace("/^[0-9]{0,$end}/",'xxxxxxxxx',$cc);
$anon_cc = substr_replace($cc, 'xxxxxxx', 0, $end);
$replacements[$cids[$flipped_map['x_card_num']]] = $anon_cc;
//blank out the expiration date as well
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment