(OFBIZ-9290)
Currently the user has the ability to add terms to an invoice,
but doesn't have the functions to edit or remove existing terms.
jleroux: Based on Akshay Modak's patch, which was, mmm..., imperfect
Thanks: Pierre Smits for report, Akshay Modak for initial patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857076 13f79535-47bb-0310-9956-ffa450edef68
JobPoller so that important jobs can be prioritized over normal jobs, and low
priority jobs can be left until last. [OFBIZ-10865]
Changes are as follows:
* Add a "priority" field to JobSandbox entity (numeric/Long)
* Add JobPriority constants class containing fields LOW (0), NORMAL (50) and HIGH (100)
* Add getPriority method to the Job interface and implement methods for AbstractJob (returns NORMAL), PersistedServiceJob (returns JobSandbox.priority) and PurgeJob (returns LOW)
* Change the JobPoller executor's queue to use PriorityBlockingQueue (unbounded) instead of LinkedBlockingQueue (bounded)
* Implement custom Comparator for the priority queue to sort by priority descending and then runTime ascending
* Change the poll size per poll to be (queueSize() - queue.size) instead of queue.remainingCapacity() due to the new queue being unbounded
* I've also opted to limit the database poll query to the poll size using maxRows() because it seemed dangerous to me to use an unconstrained query on this table
* Ensured recurring jobs receive the default (NORMAL) priority when being rescheduled so that they're sorted correctly on the next time they show up in the database poll
* Ensured jobs generated at runtime are given a default priority of NORMAL
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857071 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10906)
When you add an item on the cart with some orderItemAttributes with the function
/** add rental (with accommodation) item to cart and order item attributes*/
public int addOrIncreaseItem(...too long...)
OrderItemAttributes didn't throw to the second function and we lost them.
Thanks to Leila Mekika to found it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856880 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10706)
I tried to find the history for why the service does not take the
defaultFromEmailAddress property from general.properties and I found that It was
last modified in revision r418498 on 02/07/2006, I think it was always broken.
This uses defaultFromEmailAddress property in sendMail if sendFrom is missing
Thanks: Benjanmin Jugl reported, Pawan Verma fixed and others for discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856667 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10743)
Used code128 to generate product barcode.
Thanks Ashish Sharma for reporting, everyone who participated in discussion and Pawan Verma for providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856617 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9089)
Slightly modified patch. Improved class name and file name.
Thanks Pradhan Yash Sharma for reporting and initial patch & Yogesh Naroliya for providing updated patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856613 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9849)
Silghtly modified patch as Specify-other Dropdown field were not working. Refactored code in combobox.js file
Thanks Dhaval Wagela for the initial patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856610 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10377)
In the case of entity auto service, when an invalid status change is performed, the error message doesn't show the current status of the item from which the user is changing the status.
Thanks: Lalit Dashora for reporting the issue and providing the patch.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856598 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10817)
When freemarker failed to execute a template, you have on end screen rendered all java stack trace generated.
I improve this to display the stack trace only when widget is on verbose, no regression during development and when you switch to production site, in general your widget verbose is off so end user haven't stack trace and replace it by ∎ (that totally unused for them but help to detect a problem).
I also introduce two new properties on widget.properties:
widget.freemarker.template.verbose : if your widget verbose is off and you want display the freemarker stacktrace when your template generate an exception set it to true
widget.freemarker.template.exception.message : when you don't displaying freemarker stacktrace, you can replace it by an other message by default it use ∎ but you can set what you want, like 'ERROR', '##' or ' '
Thanks to Deepak Dixit, Jacques Le Roux, Michael Brohl and Mathieu Lirzin for their suggest
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856524 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Ed Mack
This adds
org.apache.ofbiz.widget.model.ModelTheme
java.util.Collections
java.util.LinkedList
java.util.ArrayList
java.util.TimeZonz
Thanks: Ed Mack at OFBIZ-10876
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856484 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
There was a recurring typo in previous commit.
For arrays of primitives it should be
"\\[Z","\\[B","\\[S","\\[I","\\[J","\\[F","\\[D","\\[C"
and not
"[Z","[B","[S","[I","[J","[F","[D","[C"
It shows how tired I'm :/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856460 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
There was a recurring typo in previous commit.
For arrays of primitives it should be
"[Z","[B","[S","[I","[J","[F","[D","[C"
and not
"[Z ","[B ","[S ","[I ","[J ","[F ","[D ","[C "
Just spotted that while reviewing again (did not have the time to test)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856459 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Ed Mack
This adds all arrays of primitives and java.math.BigDecimal
Thanks: Ed Mack at OFBIZ-10876
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856455 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Wolfgang Rauchholz on user
ML
This adds java.math.BigDecimal and "[B" (ie [B == byte[] and I don't understand
why in this case "byte[]" does not work)
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Ingo Wolfmayr at OFBIZ-10870
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856405 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10873)
The HTTP/2 implementation accepted streams with excessive numbers of
SETTINGS frames and also permitted clients to keep streams open without
reading/writing request/response data. By keeping streams open for
requests that utilised the Servlet API's blocking I/O, clients were able
to cause server-side threads to block eventually leading to thread
exhaustion and a DoS.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856212 13f79535-47bb-0310-9956-ffa450edef68
Gradle provides some useful standard plugins for packaging
applications via the ‘distribution’ and ‘application’ plugins.
* The ‘distribution’ plugin [1] is providing a straightforward and
easy way to distribute OFBiz with its dependencies which is
convenient in a deployment context. This is achieved by the new
‘distTar’ and ‘distZip’ tasks.
* The ‘application’ plugin [2] is complementing the ‘distribution’
plugin by adding both a robust shell script and a batch script
inside the distribution archives to allow launching OFBiz easily.
[1] https://docs.gradle.org/current/userguide/distribution_plugin.html
[2] https://docs.gradle.org/current/userguide/application_plugin.html
Thanks to Antoine Ouvrard for contributing to this work.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856179 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10753)
When OFBiz raise an error, the framework use a jsp page to display it.
I improved the error page generation to support also ftl template rendering and by this way extend the theme engine to support to overide it
On controler.xml we can now use :
<errorpage>/error/error.jsp</errorpage>
or
<errorpage>component://common/webcommon/error/Error.ftl</errorpage> (default configuration)
On your theme you can add your own error page :
<template>
...
<template-file widget=menu location=component://common-theme/template/macro/HtmlMenuMacroLibrary.ftl/>
+ <template-file widget=error location=component://common-theme/template/ErrorPage.ftl/>
</template>
The component://common/webcommon/error/Error.ftl contains the logic theming connection and to simplify source code, all framework old error page (error.jsp) have been removed to centralize all on this new page.
Thanks to Marine Desmarchelier for the error page design
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856175 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10716)
I came across a situation where an entity was taking too much of a time
(browser asked me to either wait or kill) while loading/searching results in the
Webtools application. The entity had close to 5M records, and I checked the
server responded timely but the rendering of the screen was taking time.
When I explored the issue I came across a macro which renders the pagination on the screen, and it had a code block which was causing the screen rendering delay.
<#assign x=(listSize/viewSize)?ceiling>
<#list 1..x as i>
<#if i == (viewIndex+1)><option selected="selected" value="<#else><option value="</#if>${i-1}">${i}</option>
</#list>
This code seems logical enough to me, and what I gather from this is that the
list will render a select box with 250,000 options.
I like propose a change in this UI/UX from select box to an input text box so an
user can navigate to any page, similar to a navigation input box in a PDF
document reader application.
Thanks: Devanshu Vyas for the patch, Nicolas for discussion and Kumar Rahul for
testing
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856145 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10832)
Since most nodes will contain text then it will be more efficient to do a null check after retrieving nodeValue.
Thanks: Scott for your valuable inputs.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855898 13f79535-47bb-0310-9956-ffa450edef68
The ‘isDebugMode’ argument of the ‘createofbizcommandtask’ method was
only set to ‘true’ inside the “ofbizDebug” rule-based task. Given the
exceptionality of the case, this argument has been replaced with an
ad-hoc override of the ‘debug’ value after the fact.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855796 13f79535-47bb-0310-9956-ffa450edef68
The ‘createOfbizCommandTask’ method was only called with the
‘jvmArguments’ global variable for defining the JVM arguments of
various execution tasks. As a consequence it seems better to directly
use a reference to ‘jvmArguments’ inside the body of that method.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855795 13f79535-47bb-0310-9956-ffa450edef68
Previously only one argument at a time was passed to the ‘Exec#args’
method. Since it is possible to pass multiple arguments we can remove
some syntax redudancy.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855678 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Wolfgang Rauchholz on user
ML
This adds java.util.Date
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Wolfgang Rauchholz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855492 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10837)
Fixes CVE-2019-0189
The white list was still not complete as reported by Wolfgang Rauchholz on user
ML
This adds java.sql.Timestamp
It seems the warning in SafeObjectInputStream::resolveClass is not enough.
Anyway I'll not change it.
Thanks: Wolfgang Rauchholz
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855488 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10832)
As per the code, getTextContent() method is used get text content of the node and its descendants but the node.getTextContent() always return Null for the following Node type
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE [1]
Since we can't get the text value of Document, Document Type and Notation Node, thus simply return the same object.
[1] https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Node.html#getTextContent()
Thanks: Deepak Dixit for reviewing the code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1855403 13f79535-47bb-0310-9956-ffa450edef68