Commit Graph
10472 Commits
Author SHA1 Message Date
Jacopo Cappellato 05073f29df Upgrade to the most recent version of Freemarker-2.3-gae: this is not an official release yet but it will be soon; I have committed this work, as discussed in the dev list, in order to get help from the community to test this new improved version of Freemarker and provide feedback to the Freemarker community.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1605029 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 08:33:04 +00:00
Adam Heath 1596c224f4 Re-enable hiding of condition parameters in toString calls; this was
accidentally checked in as part of r1604972.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604985 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:45:28 +00:00
Adam Heath c423838342 Remove encryptConditionFields from the condition objects; now, the
encryption/decryption happens at the jdbc layer, when values are set
into a PreparedStatement, or fetched from a ResultSet.

This means that conditions are no longer munged to contain the encrypted
value, and entities are no longer updated to temporarily contain the
encrypted value.  In all cases, the value of a field in memory will be
unecncrypted.

This fixes the following code patterns:

person = delegator.create("Person", [partyId: "my-party"]);
person.socialSecurityNumber = "1234";
person.store();
// this fails, the encrypted value is stored inside entity
assertEquals("1234", person.socialSecurityNumber);
currentValue = person.socialSecurityNumber
person.store();
// this fails, the field is doubly-encrypted
assertEquals(currentValue, person.socialSecurityNumber);

origCondition = EntityCondition.makeCondition(
    "socialSecurityNumber",
    EntityOperator.EQUALS,
    "1234"
);
list = delegator.findList("Person", origCondition);
newCondition = EntityCondition.makeCondition(
    "socialSecurityNumber",
    EntityOperator.EQUALS,
    "1234"
);
// this fails, because the condition is updated in-place, with the
// encrypted field value.
assertEquals(origCondition, newCondition);

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604976 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:24:22 +00:00
Adam Heath eeb2cc31f3 Condition objects are now immutable. This removed more uses of
javolution classes, namely, all the factory support code is now gone.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604975 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:24:08 +00:00
Adam Heath e226c3310b Restructured so that the built-up object is a wrapper around the actual
condition; this allows the wrapped value to be changed, as the builder
api is used, and will make it possible for the actual condition object
to be made final.

To allow for this wrapper to be passed to the delegator, it extends
EntityCondition, and delegates all calls to the contained condition
object.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604974 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:24:01 +00:00
Adam Heath fb157fd4c7 encryptConditionFields now returns a new EntityCondition, if it did
anything.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604973 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:54 +00:00
Adam Heath 40a06ca876 Add EntityConditionValue.encryptConditionFields support to
EntityConditionValue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604972 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:46 +00:00
Adam Heath b6662d97b3 In EntityExpr.encryptConditionFields. pass the call down to the lhs and
rhs when we are in join mode.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604971 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:38 +00:00
Adam Heath 9d5779c95b This is the first phase at making EntityCondition objects immutable; the
classes/fields not yet finalized are left undone due to there being
side-effects with other parts of the code base.  These side-effects will
be fixed shortly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604969 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:32 +00:00
Adam Heath 5bc5c4151f Change encrypt=true fields to no longer have a pre-pended salt value.
This is done by just setting the length of salt bytes to 0, but still
having a length byte prepended.

Add a feature to allow for certain fields to actually have a salt
prefix.  This is enabled by setting encrypt=salt in the entity
definition.

This change is slightly incompatible with existing code.  Old database
values will continue to be decrypted correctly.  However, newly
encrypted values will no longer have a salt prepended, while originally
they would.  This shouldn't be a problem in practice.

This change, along with the previous commit, finally allow for direct
lookup of encrypted values.  However, already stored values will not be
found.  To fix those, each database row will have to be read in by
ofbiz, then immediately written back out.

This is part two to completely fix OFBIZ-5959:
Person.socialSecurityNumber can't be used for findByAnd.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604968 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:23 +00:00
Adam Heath 91b11ac4f8 Fix EntityExpr encryptConditionFields; in normal use, lhs would never be
a String, because it would end up being wrapped in an EntityFieldValue
object.  The only way it would be a String is during incorrect
Freemarker lookups(which no longer happen, as the
EntityCondition.makeCondition factory pattern is now in use).

With this fix in place, EntityExpr can finally start encrypting it's
field values, so that direct matching on encrypted fields can work.

This is part one to fix OFBIZ-5959: Person.socialSecurityNumber can't be
used for findByAnd.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604967 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:11 +00:00
Adam Heath 0aaad002d6 Start creating test cases for the entity engine crypto feature.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604966 13f79535-47bb-0310-9956-ffa450edef68
2014-06-24 00:23:04 +00:00
Jacques Le Roux d296ca03ca A patch from Pierre Smits for "field type emailType is missing in entity EmailTemplateSetting" https://issues.apache.org/jira/browse/OFBIZ-5660
The field email type is missing. Thus it is not possible to categorize and filter emailsettingtemplates data.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604370 13f79535-47bb-0310-9956-ffa450edef68
2014-06-21 13:36:49 +00:00
Jacques Le Roux 5a981e746a A patch from Leon for "No lock can be acquired after ofbiz application crashes." https://issues.apache.org/jira/browse/OFBIZ-5626
We have a service which semaphore set to "fail". Someday, while it was running, the whole ofbiz crashed. 
After the restart, the service is unable to run anymore since the lock file (database record in ServiceSemaphore entity) is already there.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604363 13f79535-47bb-0310-9956-ffa450edef68
2014-06-21 13:27:20 +00:00
Adam Heath cf7cfdc544 Remove the last uses of FastList from the entity engine.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1604038 13f79535-47bb-0310-9956-ffa450edef68
2014-06-19 21:38:48 +00:00
Jacques Le Roux f23f0041a0 Changes a bunch of Thru to Through (kept all truDate in a sole word to avoid ambiguities)
Note tough that thru is even in the Collins http://dictionary.reference.com/browse/thru

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1599110 13f79535-47bb-0310-9956-ffa450edef68
2014-06-02 08:02:15 +00:00
Jacques Le Roux b243ccc478 A modified patch from Ankit Jain for "We should check that the thru date is not same or older than the from date" https://issues.apache.org/jira/browse/OFBIZ-3161
jleroux: 
I reused Ankit's patch as a basis for this commit
I added an i18n label
Added a way to use alert() in showErrorAlertLoadUiLabel for generalising when no contentarea is present
Replaced $ call by jQuery
Used the <<name*='fromDate'>> and <<name*='thruDate'>> filters to get all cases (228 thruDate cases)
Still used only an alert, so it's only a warning, nothing coercive

There are other date couples like (estimatedStartDate, estimatedCompletionDate) and (actualStartDate, actualCompletionDate) but their values should not be enforced.
If ever someone wants to not let them free, then she just has to add the couples in FromThruDateCheck.js





git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598977 13f79535-47bb-0310-9956-ffa450edef68
2014-06-01 12:34:24 +00:00
Jacques Le Roux 0f31bcb2a0 Adds a new self signed SSL certificate created on the OFBiz demo VM with own CA following http://httpd.apache.org/docs/current/ssl/ssl_faq.html#realcert
This certificate is valid for 10 years (until May 27 08:43:19 2024 GMT)
Characteristics: C=US, ST=DE, L=Wilmington, O=Apache Software Fundation, OU=Apache OFBiz, CN=ofbiz-vm.apache.org/emailAddress=dev@ofbiz.apache.org
The password is still the same: changeit, I checked: HTTPS works locally

I don't really understand the content and the need of framework/base/cert/ so I only added framework/base/cert/demoCA/newcerts/03.pem and framework/base/cert/README which explains this change


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598544 13f79535-47bb-0310-9956-ffa450edef68
2014-05-30 10:46:54 +00:00
Jacques Le Roux e3a6768d56 Reverts r1598505, I will also update the files under framework\base\cert to backport all in one shoot
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598507 13f79535-47bb-0310-9956-ffa450edef68
2014-05-30 09:04:38 +00:00
Jacques Le Roux 1f1a5c952c New self signed SSL certificate created on the OFBiz demo VM with own CA following http://httpd.apache.org/docs/current/ssl/ssl_faq.html#realcert
This certificate is valid for 10 years (until May 27 08:43:19 2024 GMT)
Characteristics: C=US, ST=DE, L=Wilmington, O=Apache Software Fundation, OU=Apache OFBiz, CN=ofbiz-vm.apache.org/emailAddress=dev@ofbiz.apache.org
The password is still the same: changeit, I checked: HTTPS works locally


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598505 13f79535-47bb-0310-9956-ffa450edef68
2014-05-30 08:58:44 +00:00
Jacques Le Roux 44453730ee This slipped in inadvertently with r1521589
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598255 13f79535-47bb-0310-9956-ffa450edef68
2014-05-29 11:35:13 +00:00
Jacques Le Roux 3a6709473f Updates Tomcat to 7.0.54
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1598113 13f79535-47bb-0310-9956-ffa450edef68
2014-05-28 19:50:16 +00:00
Jacques Le Roux d647a61edb Better French label and clearly separate the label and the error in all languages
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597274 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 11:00:44 +00:00
Jacques Le Roux d7782d5fb9 Completes OFBIZ-5648 - Extend primary keys, removes trailing blanks
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597273 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 09:51:48 +00:00
Jacques Le Roux 79365e65da Completes OFBIZ-5648 - Extend primary keys, by adding XSD documentation about current restrictions
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597270 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 09:14:22 +00:00
Jacques Le Roux a00123d7e7 Closes OFBIZ-5648 - Extend primary keys
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597239 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 05:09:39 +00:00
Jacques Le Roux da63b56fbb Improves serviceResult.ftl, from Yvan Cauchy (reformatted: we use 2 spaces for indentation in FTL files)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1597237 13f79535-47bb-0310-9956-ffa450edef68
2014-05-24 05:07:39 +00:00
Jacques Le Roux 8f3be2d59f Dammit, reverts unwanted previous commit (wrong button)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1596126 13f79535-47bb-0310-9956-ffa450edef68
2014-05-20 07:42:55 +00:00
Jacques Le Roux 10f0335c64 git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1596125 13f79535-47bb-0310-9956-ffa450edef68 2014-05-20 07:40:25 +00:00
Jacques Le Roux a1fb475c88 A patch from Pierre Smits for "Service to check UomConversionDated is missing" https://issues.apache.org/jira/browse/OFBIZ-5638
While there is a service to check the existence of a record in UomConversion the equivalent to check the existence of a record in UomConversionDated (mainly used for foreign exchange rates) is lacking.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1595768 13f79535-47bb-0310-9956-ffa450edef68
2014-05-19 07:19:30 +00:00
Jacques Le Roux 606501012e Revert r1589562, it was not the origin of the issue Hans thought he crossed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1590630 13f79535-47bb-0310-9956-ffa450edef68
2014-04-28 13:31:11 +00:00
Adrian Crum 11d9b19b46 Improved some converters to strip the time-of-day from java.sql.Date values. This will help prevent JDBC drivers from changing the date when stored.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1590301 13f79535-47bb-0310-9956-ffa450edef68
2014-04-26 21:28:07 +00:00
Adrian Crum e23b118575 Fixed a bug in ObjectTypeTests.java: The CachedClassLoader maps the "Date" class name to java.sql.Date, not java.util.Date.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1590299 13f79535-47bb-0310-9956-ffa450edef68
2014-04-26 21:25:25 +00:00
Jacques Le Roux a6339f8cf9 A patch from Deepak Dixit for "Scale logo to fit content area in PDF which are based on simple decorator" https://issues.apache.org/jira/browse/OFBIZ-5006
Now logo image will be display over order pdf. Default value set in fop decorator not working properly, global set to true, Also added check in company header groovy, if logoImageUrl found in groovy then only set to context else default will be used.

Also set the logo width in company header fo.ftl as if logo image is large then it will throw warning related to content overflow on console.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589669 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 11:35:44 +00:00
Jacopo Cappellato 1ea8fe79b2 Fixes for a bug reported by Pierre Smits in OFBIZ-4130 (and OFBIZ-5319): a tenant user can access, via the delegator, the meta data information of other tenants; for example a tenant user with grants to use the Webtools application could view/edit the database details of all tenants.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589589 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 05:19:13 +00:00
Hans Bakker 25312fa05c adminport in start.properties was ignored. fixed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589562 13f79535-47bb-0310-9956-ffa450edef68
2014-04-24 03:57:06 +00:00
Jacques Le Roux da391a7439 Removes deprecated link to ISO country codes (now paying)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1589122 13f79535-47bb-0310-9956-ffa450edef68
2014-04-22 13:22:49 +00:00
Jacopo Cappellato c2fd23d0da Upgraded commons-pool to the latest bug fix only release.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1587841 13f79535-47bb-0310-9956-ffa450edef68
2014-04-16 09:38:26 +00:00
Adrian Crum 2973c29580 Fix for some Java versions that throw an exception when the String includes a "+". https://issues.apache.org/jira/browse/OFBIZ-5616
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1586987 13f79535-47bb-0310-9956-ffa450edef68
2014-04-13 14:01:17 +00:00
Adrian Crum f2799d6e72 Bug fix in ObjectTypeTests - a java.sql.Date instance created in one time zone is not equal to another instance created in another time zone.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1585959 13f79535-47bb-0310-9956-ffa450edef68
2014-04-09 13:01:18 +00:00
Adrian Crum 0499098732 Modified the String to java.sql.Date conversion. Replace deprecated constructor call with a Calendar implementation.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1585958 13f79535-47bb-0310-9956-ffa450edef68
2014-04-09 12:55:00 +00:00
Adrian Crum 70a4757b4b Fixed a bug in rev 1585033. Reported by Gareth Carter on the dev mailing list.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1585574 13f79535-47bb-0310-9956-ffa450edef68
2014-04-07 19:45:02 +00:00
Adrian Crum 9291e24ea4 Fixed a bug in String to java.sql.Date conversion. If the Date object includes time information, then the JDBC driver will adjust the date according to the default time zone - causing the wrong date to be stored in some circumstances.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1585033 13f79535-47bb-0310-9956-ffa450edef68
2014-04-05 09:46:58 +00:00
Jacques Le Roux ff0730b8de Fixes a typo reported by Brett Palmer in user ML
Adds more info about DCC

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1584873 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 19:41:08 +00:00
Jacques Le Roux a5e8b8639a Complete r1583026, sequel of "Focus input(dropdown list) when click on label in widget form" https://issues.apache.org/jira/browse/OFBIZ-5594. Thanks to Wei Zhang's report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1584552 13f79535-47bb-0310-9956-ffa450edef68
2014-04-04 08:00:04 +00:00
Jacques Le Roux e9145b1592 A patch from Christian Carlow for "Include Thailand Province Geo data" https://issues.apache.org/jira/browse/OFBIZ-5607
This patch corrects three Thailand provinces added from the previous patch which unnecessarily had the word "PROVINCE" appended end of their names which looks messy.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1583696 13f79535-47bb-0310-9956-ffa450edef68
2014-04-01 14:55:19 +00:00
Jacques Le Roux 3c11c513c0 A patch from Christian Carlow for "Include Thailand Province Geo data" https://issues.apache.org/jira/browse/OFBIZ-5607
This patch includes the CountryAddressFormat records for my Malaysia (OFBIZ-5606), Thailand, and Israel (OFBIZ-5609) geo issues.
Without this patch, the state/provinces do not appear in the dependent drop down form when adding party contact info.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1583689 13f79535-47bb-0310-9956-ffa450edef68
2014-04-01 14:52:23 +00:00
Jacques Le Roux ca8ba60af9 A patch from Christian Carlow for "Add Israel geo data OOTB" https://issues.apache.org/jira/browse/OFBIZ-5609
While importing Israeli customer data from a legacy system I determined that OFBiz does not include Israel geo data OOTB which should be added.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1583674 13f79535-47bb-0310-9956-ffa450edef68
2014-04-01 14:02:34 +00:00
Adrian Crum 191fd073b0 Fix for quirky user-selected time zone behavior. Changing the time zone in one session did not update other sessions.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1583663 13f79535-47bb-0310-9956-ffa450edef68
2014-04-01 13:32:12 +00:00
Jacques Le Roux e39e13009f A patch from Christian Carlow for "Include Thailand Province Geo data" https://issues.apache.org/jira/browse/OFBIZ-5607
I noticed that Thailand province geo data is missing OOTB while importing legacy data which should be added.

jleroux: as fort Malaysian geo data I have added the mean to load those seed data in the common/ofbiz-component.xml file

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1583551 13f79535-47bb-0310-9956-ffa450edef68
2014-04-01 07:41:21 +00:00