Compare commits
53
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
717bd4ba43 | ||
|
|
564b605d55 | ||
|
|
2ce14c8fe1 | ||
|
|
7af07c808b | ||
|
|
f089d59389 | ||
|
|
8ef5896077 | ||
|
|
57183eea13 | ||
|
|
27adfed9f0 | ||
|
|
02cd3b33b0 | ||
|
|
1a5bca9190 | ||
|
|
d75ef8212d | ||
|
|
703a32b41f | ||
|
|
9510fc9389 | ||
|
|
7fb8780c97 | ||
|
|
921db68bde | ||
|
|
6b1d71d91a | ||
|
|
c4c3012916 | ||
|
|
ac1595b304 | ||
|
|
15bb640a83 | ||
|
|
7933fef9f2 | ||
|
|
5b0b80f795 | ||
|
|
5560130451 | ||
|
|
af5d61b051 | ||
|
|
2cf6476a79 | ||
|
|
4138bf2a34 | ||
|
|
44cb8dd327 | ||
|
|
9c0c43365f | ||
|
|
58f2b14ee8 | ||
|
|
20e1e1fae7 | ||
|
|
c32abb81d2 | ||
|
|
9dd2a255e9 | ||
|
|
69f00cff78 | ||
|
|
d93f7ce590 | ||
|
|
7756b11421 | ||
|
|
2876adf26c | ||
|
|
b5cdcd9efc | ||
|
|
78f09e61ad | ||
|
|
ec4bff76a0 | ||
|
|
d6c6330b39 | ||
|
|
2b8f4f8b64 | ||
|
|
392f18f913 | ||
|
|
1cf9d9110b | ||
|
|
b06521c356 | ||
|
|
26a2be1392 | ||
|
|
a0b2f55b40 | ||
|
|
7add713a10 | ||
|
|
315bdea44b | ||
|
|
a1e495de19 | ||
|
|
4a26aecbf5 | ||
|
|
a5e96763e4 | ||
|
|
00200bfaca | ||
|
|
bbc63bc470 | ||
|
|
e1d57fba00 |
+11
-8
@@ -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=""GLREC_RECONCILED".equals("${glReconciliation.statusId}")"><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"/>
|
||||
|
||||
@@ -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=""GLREC_RECONCILED".equals("${glReconciliation.statusId}")"><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>
|
||||
|
||||
@@ -891,6 +891,11 @@ under the License.
|
||||
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
|
||||
<set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/>
|
||||
<set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/>
|
||||
<service service-name="getPartyAccountingPreferences" result-map="result">
|
||||
<field-map field-name="organizationPartyId" value="${groovy:parameters.get('ApplicationDecorator|organizationPartyId')}"/>
|
||||
</service>
|
||||
<set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/>
|
||||
<set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
|
||||
<script location="component://accounting/groovyScripts/reports/IncomeStatement.groovy"/>
|
||||
</actions>
|
||||
<widgets>
|
||||
|
||||
@@ -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}">
|
||||
|
||||
@@ -121,19 +121,7 @@ var rawdata = [
|
||||
EmpPosition: {
|
||||
label: "Add Employee Position",
|
||||
action: function (NODE, TREE_OBJ) {
|
||||
var dataSet = {};
|
||||
dataSet = {"partyId" : NODE.attr("id")};
|
||||
jQuery.ajax({
|
||||
type: "GET",
|
||||
url: "EditEmplPosition",
|
||||
data: dataSet,
|
||||
error: function(msg) {
|
||||
alert("An error occurred loading content! : " + msg);
|
||||
},
|
||||
success: function(msg) {
|
||||
jQuery('div.page-container').html(msg);
|
||||
}
|
||||
});
|
||||
window.location.href = "EditEmplPosition?partyId=" + NODE.attr("id");
|
||||
}
|
||||
},
|
||||
AddIntOrg: {
|
||||
|
||||
+2
-1
@@ -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;
|
||||
|
||||
+2
-1
@@ -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"/>
|
||||
|
||||
@@ -2119,14 +2119,14 @@ public class OrderServices {
|
||||
}
|
||||
}
|
||||
|
||||
String reasonEnumId = null;
|
||||
if (UtilValidate.isNotEmpty(itemReasonMap)) {
|
||||
reasonEnumId = itemReasonMap.get(orderItem.getString("orderItemSeqId"));
|
||||
}
|
||||
|
||||
// create order item change record
|
||||
if (!"Y".equals(orderItem.getString("isPromo"))) {
|
||||
String reasonEnumId = null;
|
||||
String changeComments = null;
|
||||
if (UtilValidate.isNotEmpty(itemReasonMap)) {
|
||||
reasonEnumId = itemReasonMap.get(orderItem.getString("orderItemSeqId"));
|
||||
}
|
||||
if (UtilValidate.isNotEmpty(itemCommentMap)) {
|
||||
changeComments = itemCommentMap.get(orderItem.getString("orderItemSeqId"));
|
||||
}
|
||||
@@ -2174,7 +2174,7 @@ public class OrderServices {
|
||||
}
|
||||
}
|
||||
// all items are cancelled -- mark the item as cancelled
|
||||
Map<String, Object> statusCtx = UtilMisc.<String, Object>toMap("orderId", orderId, "orderItemSeqId", orderItem.getString("orderItemSeqId"), "statusId", itemStatus, "userLogin", userLogin);
|
||||
Map<String, Object> statusCtx = UtilMisc.<String, Object>toMap("orderId", orderId, "orderItemSeqId", orderItem.getString("orderItemSeqId"), "statusId", itemStatus, "changeReason", reasonEnumId, "userLogin", userLogin);
|
||||
try {
|
||||
dispatcher.runSyncIgnore("changeOrderItemStatus", statusCtx);
|
||||
} catch (GenericServiceException e) {
|
||||
@@ -2215,6 +2215,7 @@ public class OrderServices {
|
||||
String orderId = (String) context.get("orderId");
|
||||
String orderItemSeqId = (String) context.get("orderItemSeqId");
|
||||
String fromStatusId = (String) context.get("fromStatusId");
|
||||
String changeReason = (String) context.get("changeReason");
|
||||
String statusId = (String) context.get("statusId");
|
||||
Timestamp statusDateTime = (Timestamp) context.get("statusDateTime");
|
||||
Locale locale = (Locale) context.get("locale");
|
||||
@@ -2290,6 +2291,7 @@ public class OrderServices {
|
||||
changeFields.put("statusId", statusId);
|
||||
changeFields.put("orderId", orderId);
|
||||
changeFields.put("orderItemSeqId", orderItem.getString("orderItemSeqId"));
|
||||
changeFields.put("changeReason", changeReason);
|
||||
changeFields.put("statusDatetime", statusDateTime);
|
||||
changeFields.put("statusUserLogin", userLogin.getString("userLoginId"));
|
||||
GenericValue orderStatus = delegator.makeValue("OrderStatus", changeFields);
|
||||
|
||||
+11
@@ -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> </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>
|
||||
|
||||
+444
-353
File diff suppressed because it is too large
Load Diff
@@ -1422,6 +1422,10 @@ under the License.
|
||||
<description>Expire a FacilityLocationGeoPoint record</description>
|
||||
<auto-attributes include="pk" mode="IN" optional="false"/>
|
||||
</service>
|
||||
<service name="deleteFacilityLocationGeoPoint" default-entity-name="FacilityLocationGeoPoint" engine="entity-auto" invoke="delete" auth="true">
|
||||
<description>Delete a FacilityLocationGeoPoint record</description>
|
||||
<auto-attributes include="pk" mode="IN" optional="false"/>
|
||||
</service>
|
||||
|
||||
<!-- InventoryItemType services -->
|
||||
<service name="createInventoryItemType" engine="entity-auto" default-entity-name="InventoryItemType" invoke="create" auth="true">
|
||||
|
||||
+1
-2
@@ -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.
|
||||
*/
|
||||
|
||||
+46
-12
@@ -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,30 +156,34 @@ 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'
|
||||
compile 'org.apache.httpcomponents:httpclient-cache:4.5.4'
|
||||
compile 'org.apache.logging.log4j:log4j-api:2.10.0' // the API of log4j 2
|
||||
compile 'org.apache.shiro:shiro-core:1.4.0'
|
||||
compile 'org.apache.tika:tika-core:1.24.1'
|
||||
compile 'org.apache.tika:tika-parsers:1.24.1'
|
||||
compile 'org.apache.tika:tika-core:1.26'
|
||||
compile 'org.apache.tika:tika-parsers:1.26'
|
||||
compile 'org.apache.pdfbox:pdfbox:2.0.23'
|
||||
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'
|
||||
compile 'org.codehaus.groovy:groovy-all:2.4.13' // Remember to change the version number in javadoc.options block
|
||||
compile 'org.freemarker:freemarker:2.3.28' // Remember to change the version number in FreeMarkerWorker class when upgrading
|
||||
compile 'org.freemarker:freemarker:2.3.31' // Remember to change the version number in FreeMarkerWorker class when upgrading
|
||||
compile 'org.hamcrest:hamcrest-all:1.3'
|
||||
compile 'org.owasp.esapi:esapi:2.1.0.1'
|
||||
compile 'org.springframework:spring-test:5.0.2.RELEASE'
|
||||
@@ -177,6 +210,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
|
||||
|
||||
@@ -17,13 +17,18 @@
|
||||
# under the License.
|
||||
###############################################################################
|
||||
|
||||
# Because of OFBIZ-10837 - Improve ObjectInputStream class.
|
||||
# If you encounter a related issue (object not in the whitelist),
|
||||
# you must provide a complete list of objects to pass to ObjectInputStream
|
||||
# through ListOfSafeObjectsForInputStream property
|
||||
# As an example, the a complete list of objects used by OFBiz OOTB is here.
|
||||
# Because of OFBIZ-10837 "Improve ObjectInputStream class."
|
||||
# If you encounter a related issue (object not in the allowList),
|
||||
# you must provide a complete list of objects to pass to ObjectInputStream through allowList property
|
||||
# As an example, the a complete list of objects used by OFBiz OOTB is here in allowList.
|
||||
# You will need to add your objects/classes to this list.
|
||||
# OFBiz committers: don't forget to add newobjects in SafeObjectInputStream class too (as default there).
|
||||
|
||||
# OFBiz committers:
|
||||
# . don't forget to add new objects in SafeObjectInputStream class too (as default there).
|
||||
# . "foo" and "SerializationInjector" are used in OFBiz tests
|
||||
|
||||
listOfSafeObjectsForInputStream=byte\\\\[\\\\], foo, SerializationInjector, \\\\[Z,\\\\[B,\\\\[S,\\\\[I,\\\\[J,\\\\[F,\\\\[D,\\\\[C, java..*, sun.util.calendar..*, org.apache.ofbiz..*, org.codehaus.groovy.runtime.GStringImpl, groovy.lang.GString
|
||||
allowList=byte\\[\\], foo, SerializationInjector, \\[Z,\\[B,\\[S,\\[I,\\[J,\\[F,\\[D,\\[C, java..*, sun.util.calendar..*, org.apache.ofbiz..*, org.codehaus.groovy.runtime.GStringImpl, groovy.lang.GString
|
||||
|
||||
#-- List of strings rejected for serialisation
|
||||
#-- The same comments than for allowList apply to denyList
|
||||
denyList=rmi, <
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+18
-12
@@ -24,6 +24,7 @@ import static org.apache.ofbiz.base.util.UtilProperties.getPropertyValue;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InvalidClassException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectStreamClass;
|
||||
import java.util.Arrays;
|
||||
@@ -36,26 +37,26 @@ import java.util.regex.Pattern;
|
||||
* only authorized class can be read from it.
|
||||
*/
|
||||
public final class SafeObjectInputStream extends ObjectInputStream {
|
||||
private static final String[] DEFAULT_WHITELIST_PATTERN = {
|
||||
private static final String[] DEFAULT_ALLOWLIST_PATTERN = {
|
||||
"byte\\[\\]", "foo", "SerializationInjector",
|
||||
"\\[Z", "\\[B", "\\[S", "\\[I", "\\[J", "\\[F", "\\[D", "\\[C",
|
||||
"java..*", "sun.util.calendar..*", "org.apache.ofbiz..*",
|
||||
"org.codehaus.groovy.runtime.GStringImpl", "groovy.lang.GString"};
|
||||
private static final String[] DEFAULT_DENYLIST = { "rmi", "<" };
|
||||
|
||||
/** The regular expression used to match serialized types. */
|
||||
private final Pattern whitelistPattern;
|
||||
private final Pattern allowlistPattern;
|
||||
|
||||
/**
|
||||
* Instantiates a safe object input stream.
|
||||
*
|
||||
* @param in the input stream to read
|
||||
* @throws IOException when reading is not possible.
|
||||
*/
|
||||
public SafeObjectInputStream(InputStream in) throws IOException {
|
||||
super(in);
|
||||
String safeObjectsProp = getPropertyValue("SafeObjectInputStream", "ListOfSafeObjectsForInputStream", "");
|
||||
String[] whitelist = safeObjectsProp.isEmpty() ? DEFAULT_WHITELIST_PATTERN : safeObjectsProp.split(",");
|
||||
whitelistPattern = Arrays.stream(whitelist)
|
||||
String allowListProp = getPropertyValue("SafeObjectInputStream", "allowList", "");
|
||||
String[] allowList = allowListProp.isEmpty() ? DEFAULT_ALLOWLIST_PATTERN : allowListProp.split(",");
|
||||
allowlistPattern = Arrays.stream(allowList)
|
||||
.map(String::trim)
|
||||
.filter(str -> !str.isEmpty())
|
||||
.collect(collectingAndThen(joining("|", "(", ")"), Pattern::compile));
|
||||
@@ -63,13 +64,18 @@ public final class SafeObjectInputStream extends ObjectInputStream {
|
||||
|
||||
@Override
|
||||
protected Class<?> resolveClass(ObjectStreamClass classDesc) throws IOException, ClassNotFoundException {
|
||||
if (!whitelistPattern.matcher(classDesc.getName()).find()) {
|
||||
// DiskFileItem, FileItemHeadersImpl are not serializable.
|
||||
if (classDesc.getName().contains("org.apache.commons.fileupload")) {
|
||||
return null;
|
||||
String className = classDesc.getName();
|
||||
// DenyList
|
||||
String rejectedObjectsProp = getPropertyValue("security", "denyList", "");
|
||||
String[] denyList = rejectedObjectsProp.isEmpty() ? DEFAULT_DENYLIST : rejectedObjectsProp.split(",");
|
||||
// For now DEFAULT_DENYLIST: don't allow RMI, prevent generics markup in string type names
|
||||
for (String deny : denyList) {
|
||||
if (className.contains(deny)) {
|
||||
throw new InvalidClassException(className, "Unauthorized deserialisation attempt");
|
||||
}
|
||||
Debug.logWarning("***Incompatible class***: "
|
||||
+ classDesc.getName()
|
||||
}
|
||||
if (!allowlistPattern.matcher(className).find()) {
|
||||
Debug.logWarning("***Incompatible class***: " + className
|
||||
+ ". Please see OFBIZ-10837. Report to dev ML if you use OFBiz without changes. "
|
||||
+ "Else follow https://s.apache.org/45war",
|
||||
"SafeObjectInputStream");
|
||||
|
||||
@@ -93,12 +93,11 @@ public final class UtilObject {
|
||||
Object obj = null;
|
||||
try {
|
||||
obj = getObjectException(bytes);
|
||||
// DiskFileItem, FileItemHeadersImpl are not serializable. So SafeObjectInputStream::resolveClass return null
|
||||
if (obj == null) {
|
||||
return null;
|
||||
}
|
||||
} catch (ClassNotFoundException | IOException e) {
|
||||
} catch (IOException e) {
|
||||
Debug.logError(e, module);
|
||||
} catch (ClassNotFoundException e1) {
|
||||
// DiskFileItem, FileItemHeadersImpl are not serializable. So SafeObjectInputStream::resolveClass return ClassNotFoundException
|
||||
return null;
|
||||
}
|
||||
return obj;
|
||||
}
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public final class FreeMarkerWorker {
|
||||
|
||||
public static final String module = FreeMarkerWorker.class.getName();
|
||||
|
||||
public static final Version version = Configuration.VERSION_2_3_28;
|
||||
public static final Version version = Configuration.VERSION_2_3_31;
|
||||
|
||||
private FreeMarkerWorker () {}
|
||||
|
||||
|
||||
@@ -775,24 +775,24 @@
|
||||
<value xml:lang="zh-TW">SecurityViewPermissionError 你沒有權限檢視本頁面. (需要"SECURITY_VIEW" 或 "SECURITY_ADMIN")</value>
|
||||
</property>
|
||||
<property key="SupportedFileFormatsIncludingSvg">
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF), SVG, PDF, and ZIP or text files with safe contents are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides de formats d'image pris en charge (GIF, JPEG, PNG, TIFF), les fichiers SVG, PDF, et les fichiers ZIP ou texte aux contenus sûrs sont acceptés.</value>
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF), SVG, PDF, and ZIP or text files with safe names (only Alpha-Numeric characters, hyphen, underscore and spaces, only 1 dot, name and extension not empty) and contents are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides de formats d'image pris en charge (GIF, JPEG, PNG, TIFF), les fichiers SVG, PDF, et les fichiers ZIP ou texte avec des noms sûrs (uniquement des caractères alphanumériques, 1 seul point, nom et extension non vides) et aux contenus sûrs sont acceptés.</value>
|
||||
</property>
|
||||
<property key="SupportedFileFormats">
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF), PDF or text files with safe contents are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides de formats d'image pris en charge (GIF, JPEG, PNG, TIFF), les fichiers PDF ou les fichiers texte aux contenus sûrs sont acceptés.</value>
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF), PDF or text files with safe names (only Alpha-Numeric characters, hyphen, underscore and spaces, only 1 dot, name and extension not empty) and contents are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides de formats d'image pris en charge (GIF, JPEG, PNG, TIFF), les fichiers PDF ou les fichiers texte avec des noms sûrs (uniquement des caractères alphanumériques, 1 seul point, nom et extension non vides) et aux contenus sûrs sont acceptés.</value>
|
||||
</property>
|
||||
<property key="SupportedImageFormatsIncludingSvg">
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF), or SVG format are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides des formats d'image pris en charge (GIF, JPEG, PNG, TIFF) ou au format SVG sont acceptés.</value>
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF), or SVG format with safe names (only Alpha-Numeric characters, hyphen, underscore and spaces, only 1 dot, name and extension not empty) are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides des formats d'image pris en charge (GIF, JPEG, PNG, TIFF) ou au format SVG avec des noms sûrs (uniquement des caractères alphanumériques, 1 seul point, nom et extension non vides) sont acceptés.</value>
|
||||
</property>
|
||||
<property key="SupportedImageFormats">
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF) are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides des formats d'image pris en charge (GIF, JPEG, PNG, TIFF) sont acceptés.</value>
|
||||
<value xml:lang="en">For security reason only valid files of supported image formats (GIF, JPEG, PNG, TIFF) with safe names (only Alpha-Numeric characters, hyphen, underscore and spaces, only 1 dot, name and extension not empty) are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers valides des formats d'image pris en charge (GIF, JPEG, PNG, TIFF) avec des noms sûrs (uniquement des caractères alphanumériques, 1 seul point, nom et extension non vides) sont acceptés.</value>
|
||||
</property>
|
||||
<property key="SupportedTextFileFormats">
|
||||
<value xml:lang="en">For security reason only text files with safe contents are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers texte dont les contenus sont sûrs sont acceptés.</value>
|
||||
<value xml:lang="en">For security reason only text files with safe names (only Alpha-Numeric characters, hyphen, underscore and spaces, only 1 dot, name and extension not empty) and contents are accepted.</value>
|
||||
<value xml:lang="fr">Pour des raisons de sécurité, seuls les fichiers texte dont les contenus et les noms sont sûrs (uniquement des caractères alphanumériques, 1 seul point, nom et extension non vides) sont acceptés</value>
|
||||
</property>
|
||||
<property key="UserLogin">
|
||||
<value xml:lang="de">Benutzeranmeldung</value>
|
||||
|
||||
@@ -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"/>
|
||||
|
||||
@@ -71,13 +71,13 @@ under the License.
|
||||
|
||||
<service name="groupTest" engine="group" location="testGroup" invoke=""/>
|
||||
|
||||
<service name="testHttp" engine="http" location="main-http" invoke="testScv">
|
||||
<!-- <service name="testHttp" engine="http" location="main-http" invoke="testScv">
|
||||
<description>HTTP service wrapper around the test service</description>
|
||||
<attribute name="message" type="String" mode="IN" optional="true"/>
|
||||
<attribute name="resp" type="String" mode="OUT"/>
|
||||
</service>
|
||||
</service> -->
|
||||
|
||||
<service name="testSoap" engine="soap" export="true" location="main-soap" invoke="testSOAPScv">
|
||||
<!-- <service name="testSoap" engine="soap" export="true" location="main-soap" invoke="testSOAPScv">
|
||||
<description>SOAP service; calls the OFBiz test SOAP service</description>
|
||||
<implements service="testSOAPScv"/>
|
||||
</service>
|
||||
@@ -87,12 +87,12 @@ under the License.
|
||||
<implements service="testScv"/>
|
||||
</service>
|
||||
|
||||
<!-- test service for local loopback testing (OFBiz Client SOAP -> OFBiz Server SOAP)
|
||||
https://ofbiz-vm2.apache.org:8443/webtools/control/SOAPService is the ultimate location for the testRemoteSoap
|
||||
test service for local loopback testing (OFBiz Client SOAP -> OFBiz Server SOAP)
|
||||
https://ofbiz-vm2.apache.org:8443/webtools/control/SOAPService is the ultimate location for the testRemoteSoap
|
||||
It's redirected from https://demo-trunk.ofbiz.apache.org/webtools/control/SOAPService by the HTTPD frontend installed by Puppet in the demo server, ie ofbiz-vm2.apache.org
|
||||
We could use also http://demo-trunk.ofbiz.apache.org/webtools/control/SOAPService but HSTS would sent it to https anyway
|
||||
So this can be used only against trunk demo and is not in the tests set to avoid a dependency on Internet -->
|
||||
<service name="testRemoteSoap" engine="soap" export="true"
|
||||
So this can be used only against trunk demo and is not in the tests set to avoid a dependency on Internet
|
||||
<service name="testRemoteSoap" engine="soap" export="true"
|
||||
location="https://demo-trunk.ofbiz.apache.org/webtools/control/SOAPService"
|
||||
invoke="testSoapSimple">
|
||||
<attribute name="defaultValue" type="Double" mode="IN" default-value="999.9999"/>
|
||||
@@ -100,12 +100,12 @@ under the License.
|
||||
<attribute name="resp" type="String" mode="OUT"/>
|
||||
</service>
|
||||
|
||||
<!-- FIXME For now, not sure why, the 4 remote SOAP services below don't work -->
|
||||
FIXME For now, not sure why, the 4 remote SOAP services below don't work
|
||||
|
||||
<!-- the location = endpoint = SOAP action -->
|
||||
<!-- invoke parameter is the name of the operation to invoke, for example LatLonListZipCode -->
|
||||
<!-- invoke parameter is needed when there are several possible operations for the SOAP action -->
|
||||
<!-- FIXME For now, not sure why, this remote SOAP service does not work -->
|
||||
the location = endpoint = SOAP action
|
||||
invoke parameter is the name of the operation to invoke, for example LatLonListZipCode
|
||||
invoke parameter is needed when there are several possible operations for the SOAP action
|
||||
FIXME For now, not sure why, this remote SOAP service does not work
|
||||
<service name="testRemoteSoap1" engine="soap" export="true"
|
||||
location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"
|
||||
invoke="LatLonListZipCode">
|
||||
@@ -118,10 +118,10 @@ under the License.
|
||||
<attribute name="result" type="String" mode="OUT"/>
|
||||
</service>
|
||||
|
||||
<!-- the location = endpoint = SOAP action -->
|
||||
<!-- invoke parameter is the name of the operation to invoke, for example LatLonListCityNames -->
|
||||
<!-- invoke parameter is needed when there are several possible operations for the SOAP action -->
|
||||
<!-- FIXME For now, not sure why, this remote SOAP service does not work -->
|
||||
the location = endpoint = SOAP action
|
||||
invoke parameter is the name of the operation to invoke, for example LatLonListCityNames
|
||||
invoke parameter is needed when there are several possible operations for the SOAP action
|
||||
FIXME For now, not sure why, this remote SOAP service does not work
|
||||
<service name="testRemoteSoap2" engine="soap" export="true"
|
||||
location="http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php"
|
||||
invoke="LatLonListCityNames">
|
||||
@@ -134,7 +134,7 @@ under the License.
|
||||
<attribute name="result" type="String" mode="OUT"/>
|
||||
</service>
|
||||
|
||||
<!-- FIXME For now, not sure why, this remote SOAP service does not work -->
|
||||
FIXME For now, not sure why, this remote SOAP service does not work
|
||||
<service name="testRemoteSoap3" engine="soap" export="true"
|
||||
location="http://www.restfulwebservices.net/wcf/EmailValidationService.svc"
|
||||
invoke="EmailValidationService">
|
||||
@@ -143,13 +143,13 @@ under the License.
|
||||
<attribute name="result" type="String" mode="OUT"/>
|
||||
</service>
|
||||
|
||||
<!-- FIXME For now, not sure why, this remote SOAP service does not work -->
|
||||
FIXME For now, not sure why, this remote SOAP service does not work
|
||||
<service name="testRemoteSoap4" engine="soap" export="true"
|
||||
location="http://www.webservicex.net/geoipservice.asmx"
|
||||
invoke="GetGeoIPContext">
|
||||
<attribute name="invoke" type="String" mode="IN" />
|
||||
<attribute name="result" type="String" mode="OUT"/>
|
||||
</service>
|
||||
</service> -->
|
||||
|
||||
<service name="testGroovy" engine="groovy" location="component://common/minilang/GroovyServiceTest.groovy" invoke="">
|
||||
<description>Test Groovy Script Service</description>
|
||||
|
||||
@@ -24,7 +24,7 @@ under the License.
|
||||
|
||||
<!-- event handlers -->
|
||||
<handler name="java" type="request" class="org.apache.ofbiz.webapp.event.JavaEventHandler"/>
|
||||
<handler name="soap" type="request" class="org.apache.ofbiz.webapp.event.SOAPEventHandler"/>
|
||||
<!-- <handler name="soap" type="request" class="org.apache.ofbiz.webapp.event.SOAPEventHandler"/> -->
|
||||
<handler name="xmlrpc" type="request" class="org.apache.ofbiz.webapp.event.XmlRpcEventHandler"/>
|
||||
<handler name="service" type="request" class="org.apache.ofbiz.webapp.event.ServiceEventHandler"/>
|
||||
<handler name="service-multi" type="request" class="org.apache.ofbiz.webapp.event.ServiceMultiEventHandler"/>
|
||||
|
||||
@@ -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]
|
||||
|
||||
|
||||
@@ -105,32 +105,43 @@ public class SecuredUpload {
|
||||
return true;
|
||||
}
|
||||
|
||||
String imageServerUrl = EntityUtilProperties.getPropertyValue("catalog", "image.management.url", delegator);
|
||||
Path p = Paths.get(fileToCheck);
|
||||
String file = p.getFileName().toString();
|
||||
boolean wrongFile = true;
|
||||
if (org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS) {
|
||||
if (fileToCheck.length() > 259) {
|
||||
Debug.logError("Uploaded file name too long", MODULE);
|
||||
return false;
|
||||
} else if (!file.matches("[a-zA-Z0-9]{1,249}.[a-zA-Z0-9]{1,10}")) {
|
||||
Debug.logError("Uploaded file "
|
||||
+ " should contain only Alpha-Numeric characters, only 1 dot as an input for the file name and the extension."
|
||||
+ "The file name and the extension should not be empty at all",
|
||||
MODULE);
|
||||
return false;
|
||||
} else if (p.toString().contains(imageServerUrl.replaceAll("/", "\\\\"))) {
|
||||
if (file.matches("[a-zA-Z0-9-_ ()]{1,249}.[a-zA-Z0-9-_ ]{1,10}")) { // "(" and ")" for duplicates files
|
||||
wrongFile = false;
|
||||
}
|
||||
} else if (file.matches("[a-zA-Z0-9-_ ]{1,249}.[a-zA-Z0-9-_ ]{1,10}")) {
|
||||
wrongFile = false;
|
||||
}
|
||||
} else {
|
||||
} else { // Suppose a *nix system
|
||||
if (fileToCheck.length() > 4096) {
|
||||
Debug.logError("Uploaded file name too long", MODULE);
|
||||
return false;
|
||||
} else if (!file.matches("[a-zA-Z0-9]{1,4086}.[a-zA-Z0-9]{1,10}")) {
|
||||
Debug.logError("Uploaded file "
|
||||
+ " should contain only Alpha-Numeric characters, only 1 dot as an input for the file name and the extension."
|
||||
+ "Tthe file name and the extension should not be empty at all",
|
||||
MODULE);
|
||||
return false;
|
||||
} else if (p.toString().contains(imageServerUrl)) {
|
||||
if (file.matches("[a-zA-Z0-9-_ ()]{1,4086}.[a-zA-Z0-9-_ ]{1,10}")) { // "(" and ")" for duplicates files
|
||||
wrongFile = false;
|
||||
}
|
||||
} else if (file.matches("[a-zA-Z0-9-_ ]{1,4086}.[a-zA-Z0-9-_ ]{1,10}")) {
|
||||
wrongFile = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (wrongFile) {
|
||||
Debug.logError("Uploaded file "
|
||||
+ " should contain only Alpha-Numeric characters, hyphen, underscore and spaces,"
|
||||
+ " only 1 dot as an input for the file name and the extension."
|
||||
+ "The file name and extension should not be empty at all",
|
||||
MODULE);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isExecutable(fileToCheck)) {
|
||||
return false;
|
||||
}
|
||||
@@ -217,10 +228,10 @@ public class SecuredUpload {
|
||||
Path filePath = Paths.get(fileName);
|
||||
byte[] bytesFromFile = Files.readAllBytes(filePath);
|
||||
ImageFormat imageFormat = Imaging.guessFormat(bytesFromFile);
|
||||
return imageFormat.equals(ImageFormats.PNG)
|
||||
return (imageFormat.equals(ImageFormats.PNG)
|
||||
|| imageFormat.equals(ImageFormats.GIF)
|
||||
|| imageFormat.equals(ImageFormats.TIFF)
|
||||
|| imageFormat.equals(ImageFormats.JPEG)
|
||||
|| imageFormat.equals(ImageFormats.JPEG))
|
||||
&& imageMadeSafe(fileName);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,10 +52,10 @@ under the License.
|
||||
<engine name="javascript" class="org.apache.ofbiz.service.engine.ScriptEngine"/>
|
||||
<!-- -->
|
||||
<engine name="route" class="org.apache.ofbiz.service.engine.RouteEngine"/>
|
||||
<engine name="http" class="org.apache.ofbiz.service.engine.HttpEngine"/>
|
||||
<!-- <engine name="http" class="org.apache.ofbiz.service.engine.HttpEngine"/> -->
|
||||
<engine name="jms" class="org.apache.ofbiz.service.jms.JmsServiceEngine"/>
|
||||
<engine name="rmi" class="org.apache.ofbiz.service.rmi.RmiServiceEngine"/>
|
||||
<engine name="soap" class="org.apache.ofbiz.service.engine.SOAPClientEngine"/>
|
||||
<!-- <engine name="soap" class="org.apache.ofbiz.service.engine.SOAPClientEngine"/> -->
|
||||
<!-- The engine xml-rpc-local is only used by a test service and for this reason it is configured to run on port 8080.
|
||||
In order to use this in OFBiz change the port accordingly (for demo the default value is 8080)
|
||||
-->
|
||||
@@ -66,14 +66,14 @@ under the License.
|
||||
</engine>
|
||||
|
||||
<service-location name="main-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
|
||||
<service-location name="main-http" location="http://localhost:8080/webtools/control/httpService"/>
|
||||
<service-location name="main-soap" location="http://localhost:8080/webtools/control/SOAPService"/>
|
||||
<!-- <service-location name="main-http" location="http://localhost:8080/webtools/control/httpService"/>
|
||||
<service-location name="main-soap" location="http://localhost:8080/webtools/control/SOAPService"/> -->
|
||||
|
||||
<service-location name="entity-sync-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
|
||||
<service-location name="entity-sync-http" location="https://localhost:8443/webtools/control/httpService"/>
|
||||
<!-- <service-location name="entity-sync-http" location="https://localhost:8443/webtools/control/httpService"/> -->
|
||||
|
||||
<service-location name="rita-rmi" location="rmi://localhost:1099/RMIDispatcher"/>
|
||||
<service-location name="eedcc-test" location="https://localhost:8443/webtools/control/httpService"/>
|
||||
<!-- <service-location name="eedcc-test" location="https://localhost:8443/webtools/control/httpService"/> -->
|
||||
|
||||
<!-- default notification group for all services loaded with 'main' loader
|
||||
- uncomment this to enable error notification for all services
|
||||
|
||||
+3
-1
@@ -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());
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ under the License.
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
|
||||
<test-case case-name="service-tests"><junit-test-suite class-name="org.apache.ofbiz.service.test.ServiceEngineTests"/></test-case>
|
||||
<test-case case-name="service-soap-tests"><junit-test-suite class-name="org.apache.ofbiz.service.test.ServiceSOAPTests"/></test-case>
|
||||
<!-- <test-case case-name="service-soap-tests"><junit-test-suite class-name="org.apache.ofbiz.service.test.ServiceSOAPTests"/></test-case> -->
|
||||
<test-case case-name="service-entity-auto-tests"><junit-test-suite class-name="org.apache.ofbiz.service.test.ServiceEntityAutoTests"/></test-case>
|
||||
|
||||
<test-case case-name="load-service-test-data">
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -43,7 +43,8 @@ under the License.
|
||||
<!-- Request Mappings -->
|
||||
|
||||
<!-- Begin Utility Requests -->
|
||||
<request-map uri="httpService">
|
||||
<!-- The 2 services below have been commented out for security reason, see OFBIZ-12212 -->
|
||||
<!-- <request-map uri="httpService">
|
||||
<event type="java" path="org.apache.ofbiz.service.engine.HttpEngine" invoke="httpEngine"/>
|
||||
<response name="success" type="none"/>
|
||||
<response name="error" type="none"/>
|
||||
@@ -53,7 +54,7 @@ under the License.
|
||||
<event type="soap"/>
|
||||
<response name="error" type="none"/>
|
||||
<response name="success" type="none"/>
|
||||
</request-map>
|
||||
</request-map> -->
|
||||
<request-map uri="xmlrpc" track-serverhit="false" track-visit="false">
|
||||
<security auth="true"/>
|
||||
<event type="xmlrpc"/>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -15,13 +15,24 @@
|
||||
# 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
|
||||
$expected = "00d0743607178962f8b120da4ccad2c64c698aec"
|
||||
$actual = (Get-FileHash gradle\wrapper\gradle-wrapper.jar -Algorithm SHA1).Hash.ToLower()
|
||||
@{$true = 'OK: Checksum match'; $false = "ERROR: Checksum mismatch!`nExpected: $expected`nActual: $actual"}[$actual -eq $expected]
|
||||
|
||||
if (!$true) {
|
||||
Remove-Item gradle\wrapper\gradle-wrapper.jar
|
||||
}
|
||||
|
||||
#Write-Host $ExecutionContext.SessionState.LanguageMode
|
||||
|
||||
Start-Sleep -s 3
|
||||
|
||||
@@ -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 ===";
|
||||
|
||||
Vendored
BIN
Binary file not shown.
+1
-1
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user