Author SHA1 Message Date
Jacques Le Roux 7933fef9f2 Fixed: EditFinAccountReconciliations does not work (OFBIZ-12198)
Like for createGlReconciliation at OFBIZ-10675 it must be that this has never
been tested nor used by anybody. In relation with OFBIZ-10675, took me hours to
understand that it was only missing an INOUT instead of a simple IN :/
2021-03-18 10:23:55 +01:00
Jacques Le Roux 5b0b80f795 Fixed: createGlReconciliation throws an error (OFBIZ-10675)
https://demo-trunk.ofbiz.apache.org/accounting/control/createGlReconciliation
When entering an amount and submitting the data an error is thrown.

jleroux:
EditFinAccountReconciliation form extends EditGlReconciliation. There
glReconciliationId and reconciledBalance fields are already present.
So adding them in EditFinAccountReconciliation  is wrong. On the other hand the
display of reconciledBalance is better in EditFinAccountReconciliation.
So I moved it there.

Thanks: Pierre Smits for report and Mohammed Rehan Khan for initial patch
2021-03-18 10:23:54 +01:00
Jacques Le Roux 5560130451 Fixed: createGlReconciliation throws an error (OFBIZ-10675)
See accounting/control/EditFinAccountReconciliations?finAccountId=ABN_CHECKING

Removes the unwanted condition to include duplicate reconciledBalance filed
which was the cause of the issue.

Thanks: Pierre Smits for report, Mohammed Rehan Khan for the fix
2021-03-18 10:23:52 +01:00
Pawan Verma af5d61b051 Fixed: Bug preventing proper explosion of BOM containing virtual nodes (OFBIZ-12191)
Thanks: Nameet for report and fix and Jacopo for test.
2021-03-15 13:38:58 +05:30
Pawan Verma 2cf6476a79 Fixed: Error in deleting Financial Account (OFBIZ-12153)
1. Navigate to URL: accounting/control/FindFinAccount
2. Click on Find button. List of fin account will be displayed.
3. Click on delete button near available balance column.

Thanks: Lalit Dashora for report, Sourabh Jain for the initial fix, Jacques for the test.
2021-03-15 13:12:15 +05:30
Jacques Le Roux 4138bf2a34 Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
Updates the documentation for Windows and Gradle wrapper download, needs
Powershell
2021-03-14 09:50:06 +01:00
Jacques Le Roux 44cb8dd327 Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
Updates init-gradle-wrapper.bat
  to exit if Gradle wrapper already exists
  to start PowerShell (>=7) in admin mode, this to be able to use Set-ItemProperty

Updates init-gradle-wrapper.ps1
 to removes exit if Gradle wrapper already exists
 to create the gradle/wrapper dir if necessary
 to handle the ConstrainedLanguage mode if necessary
2021-03-13 23:13:40 +01:00
Michael Brohl 9c0c43365f Fixed: Replace Bintray by a new place to upload the Gradle Wrapper
(OFBIZ-12192)

Changed Windows powershell script to use the proper Gradle wrapper
version. Removed the properties and batch file download.
2021-03-13 09:16:03 +01:00
Michael Brohl 58f2b14ee8 Fixed: Replace Bintray by a new place to upload the Gradle Wrapper
(OFBIZ-12192)

Changed script to use the proper Gradle wrapper version. Changed the
download url from Bintray to Gradle GitHub repository and removed the
backup link.
2021-03-13 09:14:05 +01:00
Michael Brohl 20e1e1fae7 Improved: Upgrade Gradle to version 4.5.1 for the jcenter to
mavenCentral migration (OFBIZ-12171)
2021-03-13 08:49:41 +01:00
Jacques Le Roux c32abb81d2 Fixed: Use Labels in themes names (OFBIZ-9863)
Fixes wrong C/P done with r1865370
2021-03-12 11:20:40 +01:00
Jacques Le Roux 9dd2a255e9 Fixed: webtools/control/threadList no longer works on trunk (only) (OFBIZ-12195)
It works if we downgrade Freemarker to 2.3.28 as in R18 and even using 2.3.29,
not 2.3.30.

Handles things at the Groovy level, ie put in context, rather than creating
in Freemarker template.

It's backported, even if it's not a pb but in trunk, because it's a (low)
security issue.
2021-03-12 08:59:32 +01:00
Jacques Le Roux 69f00cff78 Revert "Fixed: Error in deleting Financial Account (OFBIZ-12153)"
This reverts commit 2876adf26c.
2021-03-05 06:20:03 +01:00
Jacques Le Roux d93f7ce590 Fixed: When creating blog or forums, it failed to save (OFBIZ-10426)
Create a blog or forum and click save button, it will popup with error message.
The reason is because the mapKey passed from front end cannot be handled by the
service. The solution is not to pass the mapKey to the service.

Steps:

1) navigate to content/control/blogContent?blogContentId=BLOGROOTBIGAL

2) create a new article  content/control/EditBlogArticle?blogContentId=BLOGROOTBIGAL

Thanks: Jason Hao for report and Aman Mishra for the fix
2021-03-02 19:50:09 +01:00
Jacques Le Roux 7756b11421 Fixed: Upgrade Tomcat from 9.0.41 to 9.0.43 (OFBIZ-12165)
Fixes 2 security issues:

CVE-2021-25122 h2c request mix-up
Severity: Important

CVE-2021-25329 Incomplete fix for CVE-2020-9484 (RCE via session persistence)
Severity: Low
2021-03-01 23:21:36 +01:00
Jacques Le Roux 2876adf26c Fixed: Error in deleting Financial Account (OFBIZ-12153)
1. Navigate to URL: accounting/control/FindFinAccount
2. Click on Find button. List of fin account will be displayed.
3. Click on delete button near available balance column.

Thanks: Lalit Dashora for report, Sourabh Jain for the fix
2021-03-01 14:33:27 +01:00
Jacques Le Roux b5cdcd9efc Fixed: fixes testUpdatePartyCreditCard found by Buildbot
Changes all expireDate to 02/2100.
I'll not know if OFBiz will still be alive then, hope you will

All done by hand
2021-02-28 20:17:42 +01:00
Jacques Le Roux 78f09e61ad Fixed: Overlapped labels in Accounting transaction pdf export (OFBIZ-12110)
1. Navigate to URL: accounting/control/FindAcctgTrans
2. Click on search button and then click on export as pdf button
3. Validate the export pdf file, here labels are overlapped in pdf header.

Thanks: Lalit Dashora for report and enehlauri on GH with PR-281 for the fix
2021-02-28 11:34:27 +01:00
Michael Brohl ec4bff76a0 Improved: Switch from jCenter to mavenCentral to handle the jCenter
shutdown (OFBIZ-12171)
2021-02-27 14:43:54 +01:00
Michael Brohl d6c6330b39 Improved: Upgrades Gradle due to the jCenter to mavenCentral migration
(OFBIZ-12171)
2021-02-27 14:43:54 +01:00
Michael Brohl 2b8f4f8b64 Fixed: Corrects wrong API use for Collections and Arrays
edu.emory.mathcs.backport.java.util.* instead of java.util.*
which was spotted during the jCenter to mavenCentral migration.
2021-02-27 14:43:54 +01:00
Jacques Le Roux 392f18f913 Improved: Enlarge the "more-app" menu in Rainbow Stome theme (OFBIZ-12181)
Enlarges #more-app in rainbowstone-main-theme.less from 40 to 200px
2021-02-26 10:31:22 +01:00
Jacques Le Roux 1cf9d9110b Fixed: Error while running MRP (OFBIZ-12187)
I tried running MRP for Sales Forecast option and it returned the following error.

Error running the initMrpEvents service: Service [initMrpEvents] target threw
an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date)

Thanks: Nameet Jain

Conflict handled by hand
2021-02-23 13:02:11 +01:00
Jacques Le Roux b06521c356 Fixed: fixes wrong wiki URLs 2021-02-22 11:44:17 +01:00
Jacques Le Roux 26a2be1392 Fixed: Wrong heading on creating quote under order component (OFBIZ-11221)
Steps to re-generate :

1. Login with the username and password.
2. Go to order component order.
3. Click on Quotes
4. Click on new quotes

Error: Edit quote is shown on the place of New quote.
Actual: New quote should be shown on the place of edit quote on UI.

Thanks: jai kumar raghuwanshi for report, Pradyum Dharwa  for 1st patch,
Ratnesh Upadhyay for better suggestion and Ankit Joshi for the patch
2021-02-20 13:29:21 +01:00
Jacques Le Roux a0b2f55b40 Fixed: Bypass Java GString to String conversion in ObjectType::simpleTypeOrObjectConvert (OFBIZ-12182)
Follows https://markmail.org/message/azn7e4g2rbpo7tvj

Conflicts handled by hand
 framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java
2021-02-19 09:38:50 +01:00
Wiebke Pätzold 7add713a10 Fixed: Financial account transaction (OFBIZ-10308)
Fixes the direction of some accounting transactions.

Thanks Ingo Wolfmayr for the patch
2021-02-15 19:50:21 +01:00
Michael Brohl 315bdea44b Fixed: Unable to add product (of ASSET_USAGE type) in order
(OFBIZ-10791)

The patch was manually applied due to conflicts/renamed ressources.

Thanks Priya Sharma for providing the patch.
2021-02-15 18:23:03 +01:00
Jacques Le Roux a1e495de19 Fixed: issue put in with r1160964 (9 years, 5 months ago)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:08:33 +01:00
Jacques Le Roux 4a26aecbf5 Fixed: Use from-field pattern instead of value=${***} pattern in 'set' element (OFBIZ-9607)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:08:32 +01:00
Suraj Khurana a5e96763e4 Fixed: ViewQuoteProfit shows fields in wrong order.
(OFBIZ-11680)
Thanks Pierre for reporting and Lalit Dashora for providing the patch.
2021-02-12 11:12:17 +05:30
Jacques Le Roux 00200bfaca Fixed: Adds a blacklist (to be renamed soon to denylist) in Java serialisation (OFBIZ-12167)
Adds an example based on RMI which is known to be a problem
2021-02-09 09:59:17 +01:00
Jacques Le Roux bbc63bc470 Fixed: Ampersand in Party not displayed correctly (OFBIZ-12140)
In the reported case, ModelFormField::getDescription double HTML encodes the
description when both the entity and the description contain an ampersand.

A solution is to test if the description is already HTML encoded before encoding
it again. If HTML encoded then only String encodes it.

BTW I'm not sure it's useful but it's harmless, the same solution can be applied
to OFBIZ-12026 and similarly in renderableFtlFormElementsBuilder::encode. I'll
do as improvements...

Thanks: Andrew Waters for report and help in analysis
2021-01-23 17:50:03 +01:00
Jacques Le Roux e1d57fba00 Fixed: Creating a new Customer create a wrong record in CommunicationEvent (OFBIZ-12142)
In https://markmail.org/message/pf3d3qyjfucicbj7 I initially answered:
In demo data 13 parties use <<infoString="ofbiztest@example.com">> as in
<ContactMech contactMechId="FRA01" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
This one is loaded last. Rather
<ContactMech contactMechId="Company" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
which is the 1st one, should be loaded last.

A better solution is to use "ofbizsupport@example.com" in EmailServices.xml

Indeed, fortunately the Company party also uses this infoString and using it in
EmailServices.xml does not affect the integration test and should not affect
other parts of the (only) demo data

Thanks: Emad Radwan for opiniated report :) and Pritam Kute for issue analysis
2021-01-18 20:14:44 +01:00
42 changed files with 208 additions and 155 deletions
+11 -8
View File
@@ -20,7 +20,7 @@ under the License.
= Apache OFBiz®
If you are reading this file in AsciiDoc format you may want to see it in
https://ci.apache.org/projects/ofbiz/site/stable/readme/html5/README.html[HTML]
https://ci.apache.org/projects/ofbiz/site/stable/readme/html5/README.html[HTML]
or https://ci.apache.org/projects/ofbiz/site/stable/readme/pdf/README.pdf[PDF] format
---
@@ -59,14 +59,17 @@ ________________________________________________________________________________
[[system-requirements]]
== System requirements
The only requirement to run OFBiz is to have the Java Development Kit (JDK)
version 8 installed on your system (not just the JRE, but the full JDK) which
you can download from the below link. Make sure of setting the $JAVA_HOME
environment variable.
The only requirements to run OFBiz is
* to have the Java Development Kit (JDK) version 8 installed on your system
(not just the JRE, but the full JDK) that you can download from the below link.
Make sure of setting the $JAVA_HOME environment variable. +
https://adoptopenjdk.net/[JDK download], https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
* If on Windows, a Powershell version >= 7.1.3 installed that you can download from the below link. +
https://github.com/PowerShell/PowerShell[Powershell]
https://adoptopenjdk.net/[JDK download]
https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
[[quick-start]]
// tag::quickstart[]
@@ -395,7 +398,7 @@ dash!
Loads all data sets; meant for initial loading of generic OFBiz data. Can be
applied for development, testing, demonstration, etc. purposes. Be aware that
executing this task can result in your data being overwritten in your database
of choice.
of choice.
`gradlew loadAll` OR `gradlew "ofbiz --load-data"`
@@ -33,7 +33,7 @@ under the License.
organizationPartyId="Company" ownerPartyId="Company" postToGlAccountId="231000" isRefundable="Y" replenishLevel="0.00" actualBalance="0.00" availableBalance="0.00"/>
<FinAccountStatus finAccountId="AMEX_01" statusId="FNACT_ACTIVE" statusDate="2009-04-01 00:00:01.000"/>
<PaymentMethod paymentMethodId="AMEX_01" paymentMethodTypeId="CREDIT_CARD" partyId="Company" description="AmEx 0005" glAccountId="231000" finAccountId="AMEX_01" fromDate="2009-04-01 00:00:00.000"/>
<CreditCard paymentMethodId="AMEX_01" cardType="CCT_AMERICANEXPRESS" cardNumber="378282246310005" expireDate="02/2020" companyNameOnCard="Your Company Name"
<CreditCard paymentMethodId="AMEX_01" cardType="CCT_AMERICANEXPRESS" cardNumber="378282246310005" expireDate="02/2120" companyNameOnCard="Your Company Name"
titleOnCard="" firstNameOnCard="Smart" middleNameOnCard="" lastNameOnCard="Guy" suffixOnCard="" contactMechId="9000"/>
<PaymentMethod paymentMethodId="PETTY_CASH" paymentMethodTypeId="CASH" partyId="Company" description="Petty Cash" glAccountId="110000" fromDate="2009-04-01 00:00:00.000"/>
@@ -78,8 +78,8 @@ under the License.
<!-- TODO: somehow determine if this is an order placed against the account or some other type of withdrawal -->
<!-- TODO: handle order placed against (paid for with) the account -->
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="parameters.glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="parameters.glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="PAYMENT_ACCTG_TRANS"/>
</then>
</else-if>
@@ -89,6 +89,12 @@ under the License.
<!-- if positive will go to one account for write-off, if negative will go to another account for a fee -->
<!-- these will reverse depending on positive/negative amount -->
<if-compare field="finAccountTrans.amount" operator="less" value="0">
<calculate field="quickCreateAcctgTransAndEntries.amount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="multiply">
<calcop operator="get" field="quickCreateAcctgTransAndEntries.amount"/>
<number value="-1"/>
</calcop>
</calculate>
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="parameters.glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="OUTGOING_PAYMENT"/>
@@ -70,7 +70,8 @@ under the License.
<field-map field-name="finAccountId" value="1002"/>
</entity-one>
<assert>
<if-empty field="finAccount"/>
<not><if-empty field="finAccount"/></not>
<not><if-empty field="finAccount.thruDate"/></not>
</assert>
<check-errors/>
</simple-method>
@@ -48,7 +48,7 @@ under the License.
<attribute name="replenishPaymentId" type="String" mode="OUT" optional="true"/>
<attribute name="replenishLevel" type="BigDecimal" mode="OUT" optional="true"/>
</service>
<service name="deleteFinAccount" default-entity-name="FinAccount" engine="entity-auto" invoke="delete">
<service name="deleteFinAccount" default-entity-name="FinAccount" engine="entity-auto" invoke="expire">
<description>Delete a Financial Account</description>
<auto-attributes mode="IN" optional="false" include="pk"/>
</service>
@@ -137,7 +137,7 @@ under the License.
location="component://accounting/minilang/ledger/GeneralLedgerServices.xml" invoke="updateGlReconciliation" auth="true">
<description>Update a GlReconciliation record</description>
<permission-service service-name="basicGeneralLedgerPermissionCheck" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="pk" mode="INOUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true">
<exclude field-name="createdByUserLogin"/>
<exclude field-name="lastModifiedByUserLogin"/>
@@ -556,7 +556,7 @@ under the License.
<attribute name="customTimePeriodId" mode="IN" type="String"/>
<attribute name="previousTimePeriod" mode="OUT" type="Map" optional="true"/>
</service>
<service name="getAcctgTransEntriesAndTransTotal" engine="simple" invoke="getAcctgTransEntriesAndTransTotal"
<service name="getAcctgTransEntriesAndTransTotal" engine="simple" invoke="getAcctgTransEntriesAndTransTotal"
location="component://accounting/minilang/ledger/AcctgTransServices.xml" auth="true">
<description>Given AcctgTransAndEntire and Calculate acctg trans total for specific time period.</description>
<attribute name="customTimePeriodStartDate" mode="IN" type="Timestamp"/>
@@ -581,7 +581,7 @@ under the License.
<attribute name="debitCreditDifference" type="BigDecimal" mode="OUT"/>
</service>
<service name="revertAcctgTransOnCancelInvoice" engine="simple"
<service name="revertAcctgTransOnCancelInvoice" engine="simple"
location="component://accounting/minilang/ledger/AcctgTransServices.xml" invoke="revertAcctgTransOnCancelInvoice" auth="true">
<description>Reverting Accounting Transaction And Entries on Canceling an Invoice</description>
<attribute name="invoiceId" mode="IN" type="String" optional="false"/>
@@ -589,7 +589,7 @@ under the License.
<service name="revertAcctgTransOnRemovePaymentApplications" engine="simple"
location="component://accounting/minilang/ledger/AcctgTransServices.xml" invoke="revertAcctgTransOnRemovePaymentApplications" auth="true">
<description>Create Reverse Accounting Transaction and Entries on removing PaymentApplication records.</description>
<attribute name="paymentApplicationId" mode="IN" type="String" optional="false"/>
<attribute name="paymentApplicationId" mode="IN" type="String" optional="false"/>
</service>
<service name="createGlAccountCategory" engine="entity-auto" default-entity-name="GlAccountCategory" invoke="create" auth="true">
@@ -656,7 +656,7 @@ under the License.
<attribute name="oldStatusId" type="String" mode="OUT" optional="true"/>
</service>
<service name="createUpdateCostCenter" engine="java" auth="true" invoke="createUpdateCostCenter"
<service name="createUpdateCostCenter" engine="java" auth="true" invoke="createUpdateCostCenter"
location="org.apache.ofbiz.accounting.ledger.GeneralLedgerServices">
<description>Create Update CostCenters</description>
<attribute name="glAccountId" mode="IN" type="String"/>
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="FindFinAccounts" type="single" target="FindFinAccount"
@@ -73,7 +73,7 @@ under the License.
<parameter param-name="partyId" from-field="ownerPartyId"/>
</hyperlink>
</field>
<field name="deleteLink" title=" " widget-style="buttontext">
<field name="deleteLink" title=" " widget-style="buttontext" use-when="thruDate==null">
<hyperlink description="${uiLabelMap.CommonDelete}" target="deleteFinAccount" also-hidden="false">
<parameter param-name="finAccountId"/>
</hyperlink>
@@ -336,7 +336,7 @@ under the License.
<field name="glReconciliationId" position="2">
<drop-down allow-empty="true">
<option key="_NA_" description="${uiLabelMap.CommonNotAssigned}"/>
<list-options list-name="glReconciliations" key-name="glReconciliationId"
<list-options list-name="glReconciliations" key-name="glReconciliationId"
description="${glReconciliationName}[[${glReconciliationId}] [${reconciledDate}] [${reconciledBalance}]]"/>
</drop-down>
</field>
@@ -346,17 +346,17 @@ under the License.
<field name="thruEntryDate" position="2"><date-time/></field>
<field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="FindBankReconciliationFinAcctTrans" target="BankReconciliation"
<form name="FindBankReconciliationFinAcctTrans" target="BankReconciliation"
extends="FindFinAccountTransactions">
<field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field>
<field name="glReconciliationId" position="2">
<drop-down>
<list-options list-name="glReconciliations" key-name="glReconciliationId"
<list-options list-name="glReconciliations" key-name="glReconciliationId"
description="${glReconciliationName}[[${glReconciliationId}] [${reconciledDate}] [${reconciledBalance}]]"/>
</drop-down>
</field>
</form>
<form name="EditDepositPayment" extends="EditPayment"
<form name="EditDepositPayment" extends="EditPayment"
extends-resource="component://accounting/widget/PaymentForms.xml" target="createDepositPayment">
<actions>
<entity-one entity-name="FinAccount" value-field="finAccount"/>
@@ -400,12 +400,8 @@ under the License.
</actions>
<alt-target use-when="glReconciliationId != null" target="updateFinAccountGlReconciliation"/>
<field name="finAccountId"><hidden value="${finAccountId}"/></field>
<field name="glReconciliationId" use-when="glReconciliationId == null"><ignored/></field>
<field name="glReconciliationId" use-when="glReconciliationId != null"><display/></field>
<field name="glAccountId"><hidden value="${finAccount.postToGlAccountId}"/></field>
<field name="organizationPartyId"><lookup target-form-name="LookupPartyName"/></field>
<field name="reconciledBalance" use-when="${reconciledBalance == null}"><hidden/></field>
<field name="reconciledBalance" use-when="&quot;GLREC_RECONCILED&quot;.equals(&quot;${glReconciliation.statusId}&quot;)"><display type="currency" currency="${defaultOrganizationPartyCurrencyUomId}"/></field>
<field name="reconciledDate" title="${uiLabelMap.AccountingReconciliationDate}"><date-time/></field>
<field name="createButton" use-when="glReconciliationId == null" widget-style="smallSubmit">
<submit button-type="button"/>
+3 -3
View File
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="FindAcctgTrans" target="FindAcctgTrans" type="single" title="" default-map-name="journal"
@@ -763,7 +763,7 @@ under the License.
<field name="description"><textarea/></field>
<field name="createButton" widget-style="smallSubmit"><submit button-type="button"/></field>
<sort-order>
<sort-field name="organizationPartyId"/>
<sort-field name="organizationPartyId"/>
<sort-field name="acctgTransTypeId"/>
<sort-field name="glFiscalTypeId"/>
<sort-field name="glJournalId"/>
@@ -861,7 +861,7 @@ under the License.
</field>
<field name="reconciledDate"><date-time/></field>
<field name="organizationPartyId"><display/></field>
<field name="reconciledBalance"><display/></field>
<field name="reconciledBalance" use-when="&quot;GLREC_RECONCILED&quot;.equals(&quot;${glReconciliation.statusId}&quot;)"><display type="currency" currency="${defaultOrganizationPartyCurrencyUomId}"/></field>
<field name="openingBalance" use-when="${groovy:'GLREC_RECONCILED'.equals(glReconciliation?.statusId)}"><display/></field>
<field use-when="glReconciliationId!=null" name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" ><submit button-type="text-link"/></field>
</form>
@@ -101,7 +101,6 @@
<if-not-empty field="parameters.summaryData">
<!-- create the summary data -->
<set field="createSummary.dataResourceTypeId" value="ELECTRONIC_TEXT"/>
<set field="createSummary.contentPurposeTypeId" value="ARTICLE"/>
<set field="createSummary.dataTemplateTypeId" value="NONE"/>
<set field="createSummary.mapKey" value="SUMMARY"/>
<set field="createSummary.ownerContentId" from-field="ownerContentId"/>
@@ -28,6 +28,7 @@ import java.io.StringWriter;
import java.io.Writer;
import java.nio.ByteBuffer;
import java.sql.Timestamp;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
@@ -50,7 +51,6 @@ import org.apache.ofbiz.service.GenericServiceException;
import org.apache.ofbiz.service.ModelService;
import org.apache.ofbiz.service.ServiceUtil;
import edu.emory.mathcs.backport.java.util.Arrays;
/**
* DataServices Class
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
<!-- ContentType forms -->
<form name="AddContentType" target="addContentType" title="" type="single"
@@ -214,7 +214,7 @@ under the License.
<form name="UpdateContentPurposeOperation" target="" title="" type="list" list-name="contentList"
odd-row-style="alternate-row" header-row-style="header-row-2" default-table-style="basic-table hover-bar">
<actions>
<entity-one entity-name="ContentPurposeOperation" use-cache="false"/>
<entity-condition entity-name="ContentPurposeOperation" use-cache="false"/>
</actions>
<auto-fields-service service-name="updateContentPurposeOperation" default-field-type="display"/>
<field name="deleteLink" title=" " widget-style="buttontext">
@@ -26,7 +26,7 @@ under the License.
<actions>
<set field="headerItem" value="Forum"/>
<property-map resource="ContentUiLabels" map-name="uiLabelMap" global="true"/>
<set field="pageTitle" from-field="uiLabelMap.[titleProperty]"/>
<set field="pageTitle" from-field="uiLabelMap.${titleProperty}"/>
</actions>
<widgets>
<decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
@@ -96,6 +96,7 @@ public class BOMTree {
this.delegator = delegator;
this.dispatcher = dispatcher;
this.bomTypeId = bomTypeId;
inputProduct = EntityQuery.use(delegator).from("Product").where("productId", productId).queryOne();
@@ -153,7 +154,7 @@ public class BOMTree {
} catch (GenericEntityException gee) {
root = null;
}
this.bomTypeId = bomTypeId;
this.inDate = inDate;
rootQuantity = BigDecimal.ONE;
rootAmount = BigDecimal.ZERO;
@@ -475,7 +475,8 @@ public class MrpServices {
continue;
}
eventQuantityTmp = eventQuantityTmp.negate();
parameters = UtilMisc.toMap("mrpId", mrpId, "productId", productId, "eventDate", customTimePeriod.getDate("fromDate"), "mrpEventTypeId", "SALES_FORECAST");
parameters = UtilMisc.toMap("mrpId", mrpId, "productId", productId, "eventDate", customTimePeriod.getTimestamp("fromDate"),
"mrpEventTypeId", "SALES_FORECAST");
try {
InventoryEventPlannedServices.createOrUpdateMrpEvent(parameters, eventQuantityTmp, null, sfd.getString("salesForecastDetailId"), false, delegator);
} catch (GenericEntityException e) {
@@ -150,7 +150,7 @@ under the License.
<PartyContactMechPurpose partyId="DemoCustomer" contactMechId="9026" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2001-05-13 00:00:00.000"/>
<PaymentMethod paymentMethodId="9015" paymentMethodTypeId="CREDIT_CARD" partyId="DemoCustomer" fromDate="2001-05-13 00:00:00.000"/>
<CreditCard paymentMethodId="9015" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2021" companyNameOnCard=""
<CreditCard paymentMethodId="9015" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2121" companyNameOnCard=""
titleOnCard="" firstNameOnCard="DEMO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="9015"/>
<!-- EuroCustomer want invoices in euro and be located in Amsterdam -->
@@ -177,7 +177,7 @@ under the License.
<PartyContactMechPurpose partyId="EuroCustomer" contactMechId="EURO01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2001-05-13 00:00:00.000"/>
<PaymentMethod paymentMethodId="EUROCUSTOMER" paymentMethodTypeId="CREDIT_CARD" partyId="EuroCustomer" fromDate="2001-05-13 00:00:00.000"/>
<CreditCard paymentMethodId="EUROCUSTOMER" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2021" companyNameOnCard=""
<CreditCard paymentMethodId="EUROCUSTOMER" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2121" companyNameOnCard=""
titleOnCard="" firstNameOnCard="EURO" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="EUROCUSTOMER"/>
<!-- FrenchCustomer want invoices in euro and be located in Poussan -->
@@ -204,7 +204,7 @@ under the License.
<PartyContactMechPurpose partyId="FrenchCustomer" contactMechId="FRA01" contactMechPurposeTypeId="PRIMARY_EMAIL" fromDate="2009-01-09 00:00:00.000"/>
<PaymentMethod paymentMethodId="FRENCHCUSTOMER" paymentMethodTypeId="CREDIT_CARD" partyId="FrenchCustomer" fromDate="2009-01-09 00:00:00.000"/>
<CreditCard paymentMethodId="FRENCHCUSTOMER" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2020" companyNameOnCard=""
<CreditCard paymentMethodId="FRENCHCUSTOMER" cardType="CCT_VISA" cardNumber="4111111111111111" expireDate="02/2120" companyNameOnCard=""
titleOnCard="" firstNameOnCard="FRENCH" middleNameOnCard="" lastNameOnCard="CUSTOMER" suffixOnCard="" contactMechId="FRENCHCUSTOMER"/>
<PartyTaxAuthInfo partyId="FrenchCustomer" taxAuthGeoId="FRA" taxAuthPartyId="FRA_TA" fromDate="2001-05-13 00:00:00.000" partyTaxId="FR-12345678901" isExempt="N"/>
@@ -1775,6 +1775,7 @@ public class ShoppingCartEvents {
String catalogId = CatalogWorker.getCurrentCatalogId(request);
String itemType = null;
String itemDescription = "";
Locale locale = UtilHttp.getLocale(request);
// Get the parameters as a MAP, remove the productId and quantity params.
Map<String, Object> paramMap = UtilHttp.getParameterMap(request);
@@ -1833,6 +1834,16 @@ public class ShoppingCartEvents {
quantity = BigDecimal.ONE;
}
// get the renting data if the product quanity is more than 0
if (quantity.compareTo(BigDecimal.ZERO) > 0) {
if ("ASSET_USAGE".equals(ProductWorker.getProductTypeId(delegator, productId))
|| "ASSET_USAGE_OUT_IN".equals(ProductWorker.getProductTypeId(delegator, productId))) {
request.setAttribute("product_id", productId);
request.setAttribute("_EVENT_MESSAGE_",
UtilProperties.getMessage(resource_error, "cart.addToCart.enterBookingInforamtionBeforeAddingToCart", locale));
return "product";
}
}
// get the selected amount
String selectedAmountStr = null;
if (paramMap.containsKey("amount" + thisSuffix)) {
@@ -493,7 +493,7 @@ ${variantInfoJavaScript!}
</#if>
</#if>
</#if>
</td></tr><tr><td colspan="2" align="right">
<div>
<#-- check to see if introductionDate hasnt passed yet -->
<#if product.introductionDate?? && nowTimestamp.before(product.introductionDate)>
<p>&nbsp;</p>
@@ -536,7 +536,10 @@ ${variantInfoJavaScript!}
<input type="hidden" name="category_id" value="${requestParameters.category_id}"/>
</#if>
</#if>
</div>
</form>
</td></tr>
<tr><td colspan="2" align="right">
<div>
<#if sessionAttributes.userLogin?has_content && sessionAttributes.userLogin.userLoginId != "anonymous">
<hr />
@@ -35,74 +35,46 @@ under the License.
</#if>
<#if sendingPartyTaxId?? || phone?? || email?? || website?? || eftAccount??>
<fo:list-block provisional-distance-between-starts=".5in">
<#if sendingPartyTaxId??>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.PartyTaxId}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${sendingPartyTaxId}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:block>${uiLabelMap.PartyTaxId}: ${sendingPartyTaxId}</fo:block>
</#if>
<#if phone??>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonTelephoneAbbr}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block><#if phone.countryCode??>${phone.countryCode}-</#if><#if phone.areaCode??>${phone.areaCode}-</#if>${phone.contactNumber!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:block>${uiLabelMap.CommonTelephoneAbbr}: <#if phone.countryCode??>${phone.countryCode}-</#if><#if phone.areaCode??>${phone.areaCode}-</#if>${phone.contactNumber!}</fo:block>
</#if>
<#if email??>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonEmail}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${email.infoString!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:block>${uiLabelMap.CommonEmail}: ${email.infoString!}</fo:block>
</#if>
<#if website??>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonWebsite}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${website.infoString!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:block>${uiLabelMap.CommonWebsite}: ${website.infoString!}</fo:block>
</#if>
<#if eftAccount??>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonFinBankName}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${eftAccount.bankName!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonRouting}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${eftAccount.routingNumber!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonBankAccntNrAbbr}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${eftAccount.accountNumber!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-block provisional-distance-between-starts=".5in">
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonFinBankName}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${eftAccount.bankName!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonRouting}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${eftAccount.routingNumber!}</fo:block>
</fo:list-item-body>
</fo:list-item>
<fo:list-item>
<fo:list-item-label>
<fo:block>${uiLabelMap.CommonBankAccntNrAbbr}:</fo:block>
</fo:list-item-label>
<fo:list-item-body start-indent="body-start()">
<fo:block>${eftAccount.accountNumber!}</fo:block>
</fo:list-item-body>
</fo:list-item>
</fo:list-block>
</#if>
</fo:list-block>
</#if>
</fo:block>
</#escape>
@@ -704,6 +704,7 @@ under the License.
<event type="java" path="org.apache.ofbiz.order.shoppingcart.ShoppingCartEvents" invoke="bulkAddProducts"/>
<response name="success" type="request" value="orderentry"/>
<response name="error" type="request" value="orderentry"/>
<response name="product" type="view" value="product"/>
</request-map>
<request-map uri="bulkAddProductsInApprovedOrder">
@@ -454,8 +454,8 @@ under the License.
<display-entity entity-name="Product" key-field-name="productId" description="${productId} - ${internalName}"/>
</field>
<field name="quantity" title="${uiLabelMap.CommonQuantity}"><display/></field>
<field name="averageCost" title="${uiLabelMap.OrderOrderQuoteAverageCost}"><display/></field>
<field name="quoteUnitPrice" title="${uiLabelMap.OrderOrderQuoteUnitPrice}"><display/></field>
<field name="averageCost" title="${uiLabelMap.OrderOrderQuoteAverageCost}"><display/></field>
<field name="profit" title="${uiLabelMap.OrderOrderQuoteProfit}"><display/></field>
<field name="percProfit" title="${uiLabelMap.OrderOrderQuotePercProfit}"><display/></field>
</form>
@@ -236,7 +236,7 @@ under the License.
<widgets>
<decorator-screen name="CommonQuoteDecorator" location="${parameters.quoteDecoratorLocation}">
<decorator-section name="body">
<screenlet title="${uiLabelMap.OrderOrderQuoteEdit}">
<screenlet title="${groovy: parameters.quoteId ? uiLabelMap.OrderOrderQuoteEdit : uiLabelMap.OrderNewQuote}">
<include-form name="EditQuote" location="component://order/widget/ordermgr/QuoteForms.xml"/>
</screenlet>
</decorator-section>
@@ -21,6 +21,7 @@ package org.apache.ofbiz.securityext.login;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
@@ -58,8 +59,6 @@ import org.apache.ofbiz.service.LocalDispatcher;
import org.apache.ofbiz.service.ModelService;
import org.apache.ofbiz.webapp.control.LoginWorker;
import edu.emory.mathcs.backport.java.util.Arrays;
/**
* LoginEvents - Events for UserLogin and Security handling.
*/
+42 -9
View File
@@ -25,7 +25,10 @@ import org.asciidoctor.gradle.AsciidoctorTask
* ======================================================== */
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath 'at.bxm.gradleplugins:gradle-svntools-plugin:2.2.1'
@@ -79,8 +82,34 @@ defaultTasks 'build'
allprojects {
repositories{
jcenter()
mavenLocal()
mavenCentral()
// the switch from jCenter to mavenCentral needs some additional repositories to be configured here
// this should be checked frequently to remove obsolete configurations if the artifacts are available
// on mavenCentral directly
maven {
// org.restlet and org.restlet.ext.servlet
url "https://maven.restlet.talend.com"
}
maven {
// apache-xerces:xercesImpl:2.9.1
url "https://maven.repository.redhat.com/ga/"
}
maven {
// net.fortuna.ical4j:ical4j:1.0-rc4-atlassian-12
url "https://packages.atlassian.com/maven-3rdparty"
}
maven {
// org/milyn/flute/1.3/flute-1.3.jar
// need artifact only because of wrong pom metadata in maven central
url "https://repo1.maven.org/maven2"
metadataSources {
artifact()
}
}
maven {
// com.springsource.com.sun.syndication
url "https://repo.spring.io/plugins-release"
}
}
}
@@ -116,7 +145,7 @@ dependencies {
compile 'com.ibm.icu:icu4j:60.2'
compile 'com.lowagie:itext:2.1.7' // Don't update due to license change in newer versions, see OFBIZ-10455
compile 'com.sun.mail:javax.mail:1.6.0'
compile 'com.sun.syndication:com.springsource.com.sun.syndication:0.9.0'
compile 'com.sun.syndication:com.springsource.com.sun.syndication:1.0.0'
compile 'com.thoughtworks.xstream:xstream:1.4.10'
compile 'commons-cli:commons-cli:1.4'
compile 'commons-net:commons-net:3.6'
@@ -127,12 +156,15 @@ dependencies {
compile 'javax.servlet:javax.servlet-api:4.0.0'
compile 'javax.servlet.jsp:javax.servlet.jsp-api:2.3.2-b02'
compile 'junit:junit-dep:4.11'
compile 'net.fortuna.ical4j:ical4j:1.0-rc3-atlassian-11'
compile 'net.fortuna.ical4j:ical4j:1.0-rc4-atlassian-12'
compile 'org.apache.ant:ant-junit:1.10.1'
compile 'org.apache.axis2:axis2-kernel:1.7.7'
compile 'org.apache.commons:commons-collections4:4.1'
compile 'org.apache.commons:commons-csv:1.5'
compile 'org.apache.commons:commons-dbcp2:2.1.1'
compile ('commons-io:commons-io:2.5') {
force = true
}
compile 'org.apache.commons:commons-text:1.6'
compile 'org.apache.geronimo.components:geronimo-transaction:3.1.4'
compile 'org.apache.geronimo.specs:geronimo-jms_1.1_spec:1.1.1'
@@ -142,10 +174,10 @@ dependencies {
compile 'org.apache.tika:tika-core:1.24.1'
compile 'org.apache.tika:tika-parsers:1.24.1'
compile 'org.apache.poi:poi:3.17'
compile 'org.apache.tomcat:tomcat-catalina-ha:9.0.36'
compile 'org.apache.tomcat:tomcat-catalina:9.0.36'
compile 'org.apache.tomcat:tomcat-jasper:9.0.36'
compile 'org.apache.tomcat:tomcat-tribes:9.0.36'
compile 'org.apache.tomcat:tomcat-catalina-ha:9.0.43'
compile 'org.apache.tomcat:tomcat-catalina:9.0.43'
compile 'org.apache.tomcat:tomcat-jasper:9.0.43'
compile 'org.apache.tomcat:tomcat-tribes:9.0.43'
compile 'org.apache.xmlgraphics:fop:2.2'
compile 'org.apache.xmlrpc:xmlrpc-client:3.1.3'
compile 'org.apache.xmlrpc:xmlrpc-server:3.1.3'
@@ -177,6 +209,7 @@ dependencies {
runtime 'org.apache.logging.log4j:log4j-core:2.10.0' // the implementation of the log4j 2 API
runtime 'org.apache.logging.log4j:log4j-jul:2.10.0' // for external jars using the java.util.logging: routes logging to log4j 2
runtime 'org.apache.logging.log4j:log4j-slf4j-impl:2.10.0' // for external jars using slf4j: routes logging to log4j 2
runtime 'org.apache.logging.log4j:log4j-jcl:2.10.0' // need to constrain to version to avoid classpath conflict (ReflectionUtil)
runtime 'org.codeartisans.thirdparties.swing:batik-all:1.8pre-r1084380'
// plugin libs
@@ -20,6 +20,7 @@ package org.apache.ofbiz.base.container;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.stream.Collectors;
@@ -32,7 +33,6 @@ import org.apache.ofbiz.base.start.StartupLoader;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.UtilValidate;
import edu.emory.mathcs.backport.java.util.Collections;
/**
* An object that loads containers (background processes).
@@ -508,13 +508,12 @@ public class ObjectType {
if (obj == null || UtilValidate.isEmpty(type) || "Object".equals(type) || "java.lang.Object".equals(type)) {
return obj;
}
if ("PlainString".equals(type)) {
if ("PlainString".equals(type)
|| ("org.codehaus.groovy.runtime.GStringImpl".equals(obj.getClass().getName()) && "String".equals(type))) {
return obj.toString();
}
if (obj instanceof Node) {
Node node = (Node) obj;
String nodeValue = node.getTextContent();
if (nodeValue == null) {
@@ -63,9 +63,18 @@ public final class SafeObjectInputStream extends ObjectInputStream {
@Override
protected Class<?> resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException {
if (!whitelistPattern.matcher(classDesc.getName()).find()) {
String className = classDesc.getName();
// BlackList exploits; eg: don't allow RMI here
if (className.contains("java.rmi.server")) {
Debug.logWarning("***Incompatible class***: "
+ classDesc.getName()
+ ". java.rmi.server classes are not allowed for security reason",
"SafeObjectInputStream");
return null;
}
if (!whitelistPattern.matcher(className).find()) {
// DiskFileItem, FileItemHeadersImpl are not serializable.
if (classDesc.getName().contains("org.apache.commons.fileupload")) {
if (className.contains("org.apache.commons.fileupload")) {
return null;
}
Debug.logWarning("***Incompatible class***: "
@@ -51,7 +51,7 @@ under the License.
<if-not-empty field="emailTemplateSetting.fromAddress">
<set field="emailParams.sendFrom" from-field="emailTemplateSetting.fromAddress"/>
<else>
<property-to-field resource="general" property="defaultFromEmailAddress" field="emailParams.sendFrom" default="ofbiztest@example.com"/>
<property-to-field resource="general" property="defaultFromEmailAddress" field="emailParams.sendFrom" default="ofbizsupport@example.com"/>
</else>
</if-not-empty>
<set field="emailParams.sendCc" from-field="emailTemplateSetting.ccAddress"/>
@@ -33,8 +33,8 @@ endif::[]
Demo and seed passwords are stored in files loaded through security ofbiz-component.xml. To know more about that be sure to read:
* https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guidehttp://url[The technical production setup guide] notably "Initial Data Loading" and "Security Settings" sections
* https://cwiki.apache.org/confluence/display/OFBIZ/How+to+secure+your+deploymenthttp://url[How to secure your deployment]
* https://cwiki.apache.org/confluence/display/OFBIZ/Apache+OFBiz+Technical+Production+Setup+Guide[The technical production setup guide] notably "Initial Data Loading" and "Security Settings" sections
* https://cwiki.apache.org/confluence/display/OFBIZ/How+to+secure+your+deployment[How to secure your deployment]
[CAUTION]
These configuration steps are not to be neglected for the security of a *production environment*
@@ -66,7 +66,7 @@ You might prefer to use pair of public/private keys, for now by default OFBiz us
* https://security.stackexchange.com/questions/49725/is-it-really-secure-to-store-api-keys-in-environment-variables
. You may want to tie the encryption key to the logged in user. This is used by the password recreation feature. The JWT secret key is salted with a combination of the current logged in user and her/his password. This is a simple and effective safe way.
. Use a https://tools.ietf.org/html/rfc7519#section-4.1.7[JTI] (JWT ID). A JTI prevents a JWT from being replayed. This https://auth0.com/blog/blacklist-json-web-token-api-keys/http://url[auth0 blog article get deeper in that]. The same is kinda achieved with the password recreation feature. When the user log in after the new password creation, the password has already been changed. So the link (in the sent email) containing the JWT for the creation of the new password can't be reused.
. Use a https://tools.ietf.org/html/rfc7519#section-4.1.7[JTI] (JWT ID). A JTI prevents a JWT from being replayed. This https://auth0.com/blog/blacklist-json-web-token-api-keys/[auth0 blog article get deeper in that]. The same is kinda achieved with the password recreation feature. When the user log in after the new password creation, the password has already been changed. So the link (in the sent email) containing the JWT for the creation of the new password can't be reused.
. Tie the encryption key to the hardware. You can refer to this https://en.wikipedia.org/wiki/Hardware_security_module[Wikipedia page] for more information.
. If you want to get deeper in this get to this https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Key_Management_Cheat_Sheet.md#user-content-storage[OWASP documentation]
@@ -556,7 +556,9 @@ public final class EntityAutoEngine extends GenericAsyncEngine {
if (parameters.get(fieldDateNameIn) == null) {
parameters.put(fieldDateNameIn, UtilDateTime.nowTimestamp());
}
} else if (thruDatePresent && UtilValidate.isEmpty(lookedUpValue.getTimestamp("thruDate"))) {
}
// Expire thruDate fields
if (thruDatePresent && UtilValidate.isEmpty(lookedUpValue.getTimestamp("thruDate"))) {
if (UtilValidate.isEmpty(parameters.get("thruDate"))) {
parameters.put("thruDate", UtilDateTime.nowTimestamp());
}
@@ -50,4 +50,13 @@ Thread[] allThreadArray = new Thread[1000]
topThreadGroup.enumerate(allThreadArray)
allThreadList = Arrays.asList(allThreadArray)
allThreadStackTrace = [:]
for (thread in allThreadList) {
if (thread) {
allThreadStackTrace.put(thread.getName(), thread.getStackTrace())
}
}
context.currentThread = currentThread
context.allThreadStackTrace = allThreadStackTrace
context.allThreadList = allThreadList
@@ -18,7 +18,7 @@ under the License.
-->
<#if parameters.maxElements?has_content><#assign maxElements = parameters.maxElements?number/><#else><#assign maxElements = 10/></#if>
<p>${uiLabelMap.WebtoolsThisThread}<b> ${Static["java.lang.Thread"].currentThread().getName()} (${Static["java.lang.Thread"].currentThread().getId()})</b></p>
<p>${uiLabelMap.WebtoolsThisThread}<b> ${currentThread.getName()} (${currentThread.getId()})</b></p>
<br />
<table class="basic-table hover-bar" cellspacing="0">
<tr class="header-row">
@@ -32,7 +32,7 @@ under the License.
<#assign alt_row = false>
<#list allThreadList as javaThread>
<#if javaThread??>
<#assign stackTraceArray = javaThread.getStackTrace()/>
<#assign stackTraceArray = allThreadStackTrace.get(javaThread.getName())/>
<tr valign="middle"<#if alt_row> class="alternate-row"</#if>>
<td valign="top">${(javaThread.getThreadGroup().getName())!}</td>
<td valign="top">${javaThread.getId()?string}</td>
@@ -36,6 +36,7 @@ import java.util.Map;
import java.util.StringTokenizer;
import java.util.TimeZone;
import org.apache.commons.text.StringEscapeUtils;
import org.apache.ofbiz.base.conversion.ConversionException;
import org.apache.ofbiz.base.conversion.DateTimeConverters;
import org.apache.ofbiz.base.conversion.DateTimeConverters.StringToTimestamp;
@@ -1392,7 +1393,12 @@ public class ModelFormField {
if (UtilValidate.isEmpty(retVal)) {
retVal = "";
} else if (this.getModelFormField().getEncodeOutput()) {
UtilCodec.SimpleEncoder simpleEncoder = (UtilCodec.SimpleEncoder) context.get("simpleEncoder");
UtilCodec.SimpleEncoder simpleEncoder = null;
if (retVal.equals(StringEscapeUtils.unescapeEcmaScript(StringEscapeUtils.unescapeHtml4(retVal)))) {
simpleEncoder = (UtilCodec.SimpleEncoder) context.get("simpleEncoder");
} else {
simpleEncoder = UtilCodec.getEncoder("string");
}
if (simpleEncoder != null) {
retVal = simpleEncoder.encode(retVal);
}
+10 -7
View File
@@ -15,13 +15,16 @@
# specific language governing permissions and limitations
# under the License.
if ((Test-Path -Path ((Get-Item -Path ".\").FullName + "\gradle\wrapper\gradle-wrapper.jar")) -and (Test-Path -Path ((Get-Item -Path ".\").FullName + "\gradle\wrapper\gradle-wrapper.properties"))) {
Write-Host "The Gradle Wrapper has already been downloaded.";
exit
md -force gradle/wrapper
If ($ExecutionContext.SessionState.LanguageMode -eq "ConstrainedLanguage") {
Set-ItemProperty 'hklm:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -name "__PSLockdownPolicy" -Value 8
Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.jar https://github.com/gradle/gradle/raw/v4.5.1/gradle/wrapper/gradle-wrapper.jar
Set-ItemProperty 'hklm:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment' -name "__PSLockdownPolicy" -Value 4
} else {
Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.jar https://github.com/gradle/gradle/raw/v4.5.1/gradle/wrapper/gradle-wrapper.jar
}
# HTTPS is not used because it gets complicated with Powershell and .Net framework versions depending on Windows versions
Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.jar http://dl.bintray.com/apacheofbiz/GradleWrapper/v3.2.1/gradle-wrapper.jar
Invoke-WebRequest -outf gradle\wrapper\gradle-wrapper.properties http://dl.bintray.com/apacheofbiz/GradleWrapper/v3.2.1/gradle-wrapper.properties
Invoke-WebRequest -outf gradlew.bat http://dl.bintray.com/apacheofbiz/GradleWrapper/v3.2.1/gradlew.bat
#Write-Host $ExecutionContext.SessionState.LanguageMode
Start-Sleep -s 3
+6 -10
View File
@@ -22,18 +22,17 @@ GRADLE_OFBIZ_PATH="$OFBIZ_HOME/gradle"
GRADLE_WRAPPER_OFBIZ_PATH="$GRADLE_OFBIZ_PATH/wrapper"
# version and uri to download the wrapper
RELEASE="3.2.1"
GRADLE_WRAPPER_URI="https://dl.bintray.com/apacheofbiz/GradleWrapper/v$RELEASE/"
GRADLE_WRAPPER_URI_BACKUP="https://github.com/gradle/gradle/raw/v$RELEASE/gradle/wrapper/"
RELEASE="4.5.1"
GRADLE_WRAPPER_URI="https://github.com/gradle/gradle/raw/v$RELEASE/gradle/wrapper/"
# checksum to verify the downloaded file
SHASUM_GRADLE_WRAPPER_FILES="12478d9829998a5433231ad971bae52978279a3d gradle/wrapper/gradle-wrapper.jar
05d4ab69d3f2143e017710b0917b740f75a75c07 gradle/wrapper/gradle-wrapper.properties
SHASUM_GRADLE_WRAPPER_FILES="00d0743607178962f8b120da4ccad2c64c698aec gradle/wrapper/gradle-wrapper.jar
609c5f1fbbc2ec3feeaf1c8f7183f810e9e8b22e gradle/wrapper/gradle-wrapper.properties
aaa5fb4c074407cb4d7f8c89a80342f3130880c3 gradlew"
GRADLE_WRAPPER_JAR="gradle-wrapper.jar"
GRADLE_WRAPPER_PROPERTIES="gradle-wrapper.properties"
GRADLE_WRAPPER_FILES="$GRADLE_WRAPPER_JAR $GRADLE_WRAPPER_PROPERTIES"
GRADLE_WRAPPER_FILES="$GRADLE_WRAPPER_JAR"
GRADLE_WRAPPER_SCRIPT="gradlew"
whereIsBinary() {
@@ -55,12 +54,9 @@ downloadFile() {
return 1
}
# Download the file from the main URI; if the download fails then use the backup URI
# Download the file from the main URI
resolveFile() {
downloadFile $1 $GRADLE_WRAPPER_URI;
if [ $? -eq 1 ]; then
downloadFile $1 $GRADLE_WRAPPER_URI_BACKUP;
fi
}
echo " === Prepare operation ===";
Binary file not shown.
+1 -1
View File
@@ -22,4 +22,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-3.2.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.5.1-bin.zip
+6 -3
View File
@@ -17,7 +17,10 @@ rem KIND, either express or implied. See the License for the
rem specific language governing permissions and limitations
rem under the License.
rem #####################################################################
rem interactive DOS version of mergefromtrunk.sh.
rem to use : launch and pass the trunk version number to merge in release
Powershell.exe -executionpolicy bypass -File gradle\init-gradle-wrapper.ps1
if exist "%~dp0gradle\wrapper\gradle-wrapper.jar" (
echo The Gradle Wrapper has already been downloaded.
exit /b
)
pwsh -command " Start-Process pwsh -Verb RunAs \""-Command `\""cd '%cd%'; & 'gradle\init-gradle-wrapper.ps1';`\""\"" "
@@ -693,7 +693,7 @@ li.line-odd {
justify-content: center;
font-weight: bold;
font-size: 1.4em !important;
width: 40px;
width: 200px;
height: @app-bar-height;
color: @font-color-for-dark;
}
@@ -694,7 +694,7 @@ li.line-odd {
justify-content: center;
font-weight: bold;
font-size: 1.4em !important;
width: 40px;
width: 200px;
height: @app-bar-height;
color: @font-color-for-dark;
}
@@ -695,7 +695,7 @@ li.line-odd {
justify-content: center;
font-weight: bold;
font-size: 1.4em !important;
width: 40px;
width: 200px;
height: @app-bar-height;
color: @font-color-for-dark;
}
@@ -692,7 +692,7 @@ li.line-odd {
justify-content: center;
font-weight: bold;
font-size: 1.4em !important;
width: 40px;
width: 200px;
height: @app-bar-height;
color: @font-color-for-dark;
}
+3 -3
View File
@@ -30,11 +30,11 @@ under the License.
<description>${util:label('CommonEntityLabels', 'VisualTheme.description.RAINBOWSTONE_AMBER', locale)}</description>
<screenshot location="/rainbowstone/images/themeAmber.png"/>
</visual-theme>
<visual-theme id="RAINBOWSTONE_RUBY" display-name="Rainbow Stone - Sapphire">
<visual-theme id="RAINBOWSTONE_RUBY" display-name="Rainbow Stone - Ruby">
<description>${util:label('CommonEntityLabels', 'VisualTheme.description.RAINBOWSTONE_RUBY', locale)}</description>
<screenshot location="/rainbowstone/images/themeRuby.png"/>
</visual-theme>
<visual-theme id="RAINBOWSTONE_EMERALD" display-name="Rainbow Stone - Sapphire">
<visual-theme id="RAINBOWSTONE_EMERALD" display-name="Rainbow Stone - Emerald">
<description>${util:label('CommonEntityLabels', 'VisualTheme.description.RAINBOWSTONE_EMERALD', locale)}</description>
<screenshot location="/rainbowstone/images/themeEmerald.png"/>
</visual-theme>
@@ -69,4 +69,4 @@ under the License.
<template-file widget="menu" location="component://rainbowstone/template/macro/HtmlMenuMacroLibrary.ftl"/>
</template>
</templates>
</theme>
</theme>