Skip to content

Commit

Permalink
Applied patch from jira issue - OFBIZ-3464 - Added check if the credi…
Browse files Browse the repository at this point in the history
…tcard number string is numeric in validation method isCreditcard in UtilValidate.

Thanks Nils for creating the issue and providing the patch for the same. Thanks Divesh for your help in verification. 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1649393 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ashishvijaywargiya committed Jan 4, 2015
1 parent 2f30a9b commit 75d80ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion framework/base/src/org/ofbiz/base/util/UtilValidate.java
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,9 @@ public static String appendCheckDigit(String stPassed) {
public static boolean isCreditCard(String stPassed) {
if (isEmpty(stPassed)) return defaultEmptyOK;
String st = stripCharsInBag(stPassed, creditCardDelimiters);


if (!isInteger(st)) return false;

// encoding only works on cars with less the 19 digits
if (st.length() > 19) return false;
return sumIsMod10(getLuhnSum(st));
Expand Down

0 comments on commit 75d80ce

Please sign in to comment.