Author: jleroux
Date: Mon Jan 19 17:36:56 2015
New Revision: 1653065
URL:
http://svn.apache.org/r1653065Log:
"Applied fix from trunk for revision: 1649393"
------------------------------------------------------------------------
r1649393 | ashish | 2015-01-04 20:53:29 +0100 (dim. 04 janv. 2015) | 2 lignes
Applied patch from jira issue - OFBIZ-3464 - Added check if the creditcard 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.
------------------------------------------------------------------------
Modified:
ofbiz/branches/release14.12/ (props changed)
ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/UtilValidate.java
Propchange: ofbiz/branches/release14.12/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 19 17:36:56 2015
@@ -8,4 +8,4 @@
/ofbiz/branches/json-integration-refactoring:1634077-1635900
/ofbiz/branches/multitenant20100310:921280-927264
/ofbiz/branches/release13.07:1547657
-/ofbiz/trunk:1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739
+/ofbiz/trunk:1649393,1649742,1650240,1650583,1650642,1650678,1650882,1650887,1650938,1651593,1652361,1652706,1652725,1652731,1652739
Modified: ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/UtilValidate.java
URL:
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/UtilValidate.java?rev=1653065&r1=1653064&r2=1653065&view=diff==============================================================================
--- ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/UtilValidate.java (original)
+++ ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/UtilValidate.java Mon Jan 19 17:36:56 2015
@@ -1052,7 +1052,9 @@ public class UtilValidate {
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));