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
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
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
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
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
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
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
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
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
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
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
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
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
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
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