Commit Graph
10472 Commits
Author SHA1 Message Date
Jacques Le Roux 822356ef14 Fixed: Product content management screen doesn't validate trusted users' input
(OFBIZ-10054)

Steps to recreate:
1) go to (authenticate with admin/ofbiz):
https://localhost:8443/catalog/control/EditProductContent?productId=WG-1111

2) set the content of the field labeled "Large Image" to:
non_existent.foo" onerror="alert('Hi!');

3) visit the url:
https://localhost:8443/ecommerce/control/product?product_id=WG-1111

A popup message will appear with the "Hi!".

jleroux: This is fixed by preventing any js event to be passed 

Thanks: Loris Nardo for report, Jacopo and Gregory for discussion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858965 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 06:05:05 +00:00
Mathieu Lirzin e8a656785a Improved: Remove useless ‘UtilMisc#makeSetWritable’ method
(OFBIZ-11015)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858951 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 21:42:27 +00:00
Mathieu Lirzin 247367871c Improved: Rewrite ‘CustomPermissivePolicy#matchesEither’ static method
(OFBIZ-10187)

It now uses a lambda expression instead of an anonymous class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858933 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 17:09:25 +00:00
Jacques Le Roux 344e294173 Improved: Missing uiLabel for Create New on CMS Content Find Screen
(OFBIZ-11005)

Seems that I missed to commit these.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858759 13f79535-47bb-0310-9956-ffa450edef68
2019-05-06 08:26:28 +00:00
Mathieu Lirzin 9a8b403bb3 Improved: Add missing ‘synchronized’ modifier
(OFBIZ-11004)

Overriding a synchronized method with a non-synchronized one can
introduce potential runtime concurrency bugs. Since
‘ExtendedProperties#loadFromXML’ is overridding
‘Properties#loadFromXML’ which is synchronized, it is safer to mark it
as synchonized.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858490 13f79535-47bb-0310-9956-ffa450edef68
2019-05-01 14:36:26 +00:00
Mathieu Lirzin ad645133b2 Improved: Remove unneeded generics in ‘MapContextTest’
(OFBIZ-10933)

This is done to remove a warning in OpenJDK 8 which doesn't seem to
handle ‘@safevarargs’ annotation properly when using generics.  This
warning was not present with OpenJDK 11.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858483 13f79535-47bb-0310-9956-ffa450edef68
2019-05-01 12:55:51 +00:00
Mathieu Lirzin 2d01c1e142 Improved: Do not use ‘java.util’ backported classes
(OFBIZ-11003)

Probably due to some IDE auto-importing mistake, some classes meant as
backports of the ‘java.util.Arrays’ and ‘java.util.Collections’
classes were imported.  This make no sense since we are requiring
Java 8 which already provides those.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858480 13f79535-47bb-0310-9956-ffa450edef68
2019-05-01 12:34:20 +00:00
Jacques Le Roux fc87d60987 Improved: Similar values reflecting twice on Add Action Type dropdown in Pricerule
(OFBIZ-10660)

Steps to Regenerate
1. Open /catalog/control/createProductPriceCond
2. Add the name for a new Price Rule
3. Add Condition and go to Add Action panel
4. Check the dropdown values under Action Type

*Actual: *
Same value reflecting twice in the dropdown ( Flat Amount Modify)
The Image is attached in Jira for reference

Thanks: Archana Asthana for report Prakhar Kumar for the fix

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858355 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:55:56 +00:00
Michael Brohl 52254f4435 Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

This makes the sanitizing enabled/disabled by configuration and enhances
the functionality to support custom sanitizer policies. A reasonable 
example policy class is also included.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858352 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:24:13 +00:00
Michael Brohl 32c1ad1280 Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The default host is now retrieved using the API instead of simply
retrieving the 1st host through Tomcat.getHost().

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858347 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 08:41:39 +00:00
Mathieu Lirzin b37e315aef Improved: Use the ‘@Override’ annotation
(OFBIZ-10939)

The ‘@Override’ annotation helps readers understand that the method at
hand is overriding a super class or implementing an interface.
Additionally it allows the compiler to check if the methods annotated
with ‘@Override’ are actually implementing an abstract method.

Using that annotation makes ‘@see foo.bar.ParentClass#myMethod’
comments useless, so those they have been removed for the newly
annotated methods.

Thanks Jacques Le Roux and Swapnil M Mane for acknowledging the commit.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858295 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 19:34:25 +00:00
Jacques Le Roux 4d646ce052 Improved: Use "Create" instead of "Create New" on the various screens of all
components
(OFBIZ-9905)

As the title says + removes now useless labels

Thanks: Aayush Jain for report, Sourabh Jain for the fix, Pierre Smits and 
Rishi Solanki for comments

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858291 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 17:56:44 +00:00
Jacques Le Roux 010083250f Reverted: Unknown request [images]; this request does not exist or cannot be
called directly.
(OFBIZ-10895)

Partially revert r1858094, just replaces "rmaps == null" by "rmaps.isEmpty()"

As Mathieu mentioned in dev:
<<Checking for ‘null’ here is not a solution since ‘resolveURI’ contract
it to return a non-nullable collection.
This commit is only bypassing the error handling.>>

As I said in r1858094:
<<This has been somehow broken by OFBIZ-10438 but actually it was already broken 
before but not for the same reason.>>

We need now to review/check how it worked in R15 where it's OK, and possibly 
implements the same

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858180 13f79535-47bb-0310-9956-ffa450edef68
2019-04-26 08:33:30 +00:00
Jacques Le Roux 8ef84cff72 Fixed: Unknown request [images]; this request does not exist or cannot be called
directly.
(OFBIZ-10895)

This has been somehow broken by OFBIZ-10438 but actually it was already broken 
before but not for the same reason. Finally r1838081 (for OFBIZ-10438) allows to 
easy fix it when in previous versions (pre R18) it would need another fix. 
Since it's only annoying text in log I'll let users search the solution for 
pre R18 versions and will fix it only for trunk and R18.

Replaces rmaps.isEmpty() by rmaps == null as it was before R16 (R15 has not this
issue)
Also includes Eclipse automated imports sorting


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858092 13f79535-47bb-0310-9956-ffa450edef68
2019-04-25 08:25:30 +00:00
Swapnil Mane dad9391fd0 Fixed: Parameters are not available to the next response type when form of enctype=multipart/form-data type is submitted
(OFBIZ-10833)

Reason: The UtilHttp.getMultiPartParameterMap method is used to get the parameters in case of multipart/form-data type.
The getMultiPartParameterMap parse the request to get the parameters.

{code}
uploadedItems = UtilGenerics.<FileItem>checkList(upload.parseRequest(request));
{code}

As per the Apache commons-fileupload guideline, a request can only be parsed once [1]. So, for the next response, again the same getMultiPartParameterMap method is executed (with the same request object), and no parameters are found, since, the request is already parsed.

Also, have a look at the StackOverflow question [2], it also contains related information.

Fix for the issue:
Set the consumed parameters (except uploaded file(s)) in the request attribute so that it will be available to the next response.
The uploaded file(s) are not set in request attribute again to avoid unnecessary memory consumption, also it makes no sense to traverse the uploaded file in the request.

[1] http://commons.apache.org/proper/commons-fileupload/faq.html#empty-parse

[2] https://stackoverflow.com/questions/13881272/servletfileuploadparserequestrequest-returns-an-empty-list

Thanks: Ingo Wolfmayr for reporting issue and Jacques Le Roux for review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1858035 13f79535-47bb-0310-9956-ffa450edef68
2019-04-24 09:57:08 +00:00
Gil Portenseigne 9cec8c6443 Fixed: User depersonation do not clean out impersonated user session.
(OFBIZ-10942)

Thank you Leila Mekika for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857991 13f79535-47bb-0310-9956-ffa450edef68
2019-04-23 07:31:10 +00:00
Mathieu Lirzin 26a2a5fa43 Improved: Use ‘contains’ matcher when possible
(OFBIZ-10941)

It is more precise to use the ‘contains’ matcher when checking the
values, completeness and order of a collection.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857960 13f79535-47bb-0310-9956-ffa450edef68
2019-04-22 13:47:36 +00:00
Mathieu Lirzin 47ea42c001 Improved: Use ‘containsInAnyOrder’ matcher when possible
(OFBIZ-10941)

It is more precise to use ‘containsInAnyOrder’ matcher than checking
the presence of items and the size of the collections separately.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857959 13f79535-47bb-0310-9956-ffa450edef68
2019-04-22 13:45:42 +00:00
Mathieu Lirzin 2b541d715d Improved: Check Map equality in ‘MultivaluedMapContextTests’
The equality between two maps is defined by the presence of the same
set of entries in both maps, so checking equality of the maps is
equivalent to checking directly their entries.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857958 13f79535-47bb-0310-9956-ffa450edef68
2019-04-22 13:43:04 +00:00
Mathieu Lirzin 5982be8161 Improved: Remove unnecessary declared exceptions for ‘ContainerException’
(OFBIZ-10938)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857913 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 14:22:36 +00:00
Mathieu Lirzin 3b6782981f Fixed: Remove unnecessary declared exceptions in ‘RequestHandlerTests’
(OFBIZ-10938)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857912 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 13:58:46 +00:00
Mathieu Lirzin 990c8a3aab Improved: Remove redundant specification of type arguments
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857906 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 12:49:52 +00:00
Mathieu Lirzin e34434000b Fixed: Remove unnecessary semicolons in Java code (OFBIZ-10936)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857904 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 10:55:18 +00:00
Mathieu Lirzin 9f5802e49a Improved: Do not use deprecated method in ‘DBCPConnectionFactory’
(OFBIZ-10935)

Use ‘PoolableConnectionFactory#setAutoCommitOnReturn’ instead of
‘PoolableConnectionFactory#setEnableAutoCommitOnReturn’ from
‘org.apache.commons.dbcp2’ package.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857898 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 10:14:45 +00:00
Mathieu Lirzin acff8da727 Fixed: Remove unused imports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857897 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 10:10:51 +00:00
Mathieu Lirzin d5e3c2d3d4 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857896 13f79535-47bb-0310-9956-ffa450edef68
2019-04-21 09:37:49 +00:00
Mathieu Lirzin d7127ce9ea Fixed: Ensure that ‘MapContext’ preserves insertion order properties
(OFBIZ-10933)

This fixes a regression introduced in revision 1837462.

When pushing a ‘LinkedHashMap’ inside a ‘MapContext’, the iteration
order of the ‘MapContext’ values was not corresponding to the
insertion order of the embedded ‘LinkedHashMap’ which is important in
the ‘ControllerConfig’ case where configuration elements are stored in
‘LinkedHashMap’ objects and the ‘include’ mechanism relies on
‘MapContext’.

To avoid such regression in the future, a test reproducing the bug has
been added.

Thanks: Gil Portenseigne for investigating.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857818 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 15:02:25 +00:00
Mathieu Lirzin 60a6ac1047 Improved: Add ‘UtilMisc#toMap(Supplier<Map<K, V>>, Object...)’
(OFBIZ-10933)

It is convenient to use ‘UtilMisc#toMap’ to create pseudo-literal
maps. Previously it was not possible to specify the concrete class of
the constructed map.  The ‘UtilMisc#toMap(Supplier<Map<K, V>>,
Object...)’ overload now provides a convenient way to instantiate
specific map types like ‘LinkedHashMap’ objects.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857817 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 14:57:54 +00:00
Jacques Le Roux 25cfc51474 Improved: Removes ecommerce links from applications
(OFBIZ-9241)

While working on OFBIZ-9206 I remembered how the ecommerce webapp is deeply 
entrenched in some applications components. This can at least be tested with 
product and catalog webapp.

    Get to catalog/control/EditProduct?productId=GZ-1000
    Click on the "Product Page" button => ecommerce

There are much more cases (96 occurrences actually) but most of them are not 
hard dependencies.

Since the ecommerce component is now a plugin, we need to remove all ecommerce 
links from applications, I even wonder if this issue is really an improvement 
or should not be now considered a bug...

This is a temporary solution with a FIXME it was waiting for months and I
almost forgot it. There are better ideas in the Jira but nothing have been done
yet.


Thanks: Michael and Deepak for discussion and ideas

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857398 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 12:16:31 +00:00
Jacques Le Roux 13a86c1c87 Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

Cleans and simplifies things in UtilObject.java and also handles patterns. 
That's what we missed most when needing to update.

Fixes typos in SafeObjectInputStream class and add a commented line for a WIP in
resolveProxyClass method

Also includes work done in UtilObject.java for OFBIZ-9855 
"Using try-with-resources with File IO Objects."




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857392 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 09:29:03 +00:00
Scott Gray 9a349c7a99 Fixed: Bug in TemporalExpression MinuteRange and HourRange that can cause a day
or month to be skipped when using next() (OFBIZ-10875)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857382 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 08:54:27 +00:00
Nicolas Malin 61cf2fa891 Fixed: Add converter for StringWrapper and StringBuffer
(OFBIZ-5028)
To escape exception on native conversion, we add converter for StringBuffer and StringWrapper on MiscConverters
Thanks to Christoph Neuroth for this issue

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857371 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 07:17:28 +00:00
Nicolas Malin 2c0cd81783 Improved: Add french label for CommonImport and CommonImportExport
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857335 13f79535-47bb-0310-9956-ffa450edef68
2019-04-11 14:07:01 +00:00
Jacques Le Roux 0458dc6cbc Improved: no functional change
Adds a missing ASL2 header (thanks Apache Creadur - aka Rat)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857151 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 09:42:30 +00:00
Jacques Le Roux f85a480f01 Improved: Using try-with-resources with File IO Objects.
(OFBIZ-9855)

Uses try with resources for File IO objects like ObjectInputStream and other 
objects. File classes have the AutoCloseable interface.

jleroux: this is only a part of the 2nd patch. The 1st patch will be committed
soon too...

All tests pass

Thanks: Pradhan Yash Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857099 13f79535-47bb-0310-9956-ffa450edef68
2019-04-08 09:17:55 +00:00
Deepak Dixit 8dfa0dedd9 Reverted :Use try with resource for closing ‘EntityListIterator’
This commit causing 'ResultSet not open' while rendering list forms.
Scott's comments from ML:
You'll need to be careful with this one, based on the limited usage of the
iterator here it seems likely that it will be used again later in the
process.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857095 13f79535-47bb-0310-9956-ffa450edef68
2019-04-08 05:37:54 +00:00
Mathieu Lirzin a15b7b1996 Reverted: Changes done at r#1857089 and r#1857090 (OFBIZ-10911)(OFBIZ-10912)
The Cleanups introduced by those revisions has introduced some
unexpected regressions making the Gradle ‘loadAll’ task fail.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857091 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:36:29 +00:00
Mathieu Lirzin fef3988c46 Improved: Remove ‘CreateTableCallable’ private class (OFBIZ-10912)
This class was never instantiated locally.  Since this was a private
class it is better to remove it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857090 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:12:13 +00:00
Mathieu Lirzin d639aba7e7 Improved: Remove redundant null checks (OFBIZ-10911)
Redundant null checks detected by Eclipse has been removed.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857089 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 23:02:39 +00:00
Mathieu Lirzin f3a39e9665 Fixed: Remove redundant interface declaration (OFBIZ-10910)
‘java.io.ObjectInputStream’ already implements the ‘AutoCloseable’
interface, so there is no need to declare it in
‘SafeObjectInputStream’ which extends this class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857088 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 22:11:53 +00:00
Mathieu Lirzin 8700328f09 Fixed: Remove unused type parameters (OFBIZ-10909)
No functional change.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857087 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 22:00:16 +00:00
Mathieu Lirzin 264ed9c8d2 Improved: Remove unused private ‘UnsupportedClassConverter’ class (OFBIZ-10908)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857085 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 19:39:54 +00:00
Mathieu Lirzin be39e09d80 Fixed: Use try with resource for closing ‘EntityListIterator’
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857084 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 19:38:09 +00:00
Mathieu Lirzin 3111fc6b40 Fixed: Remove unused ‘java.util.TreeMap’ import
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857083 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 19:35:37 +00:00
Mathieu Lirzin f2a72984e1 Fixed: Remove Raw type cast warning in ‘ObjectType’
Use ‘UtilGenerics#cast’ for shorter syntax.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857082 13f79535-47bb-0310-9956-ffa450edef68
2019-04-07 19:33:44 +00:00
Scott Gray ddcbb33de8 Implemented: Allow Jobs to specify a priority and be queued accordingly by the
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
2019-04-07 07:39:47 +00:00
Jacques Le Roux d2a59bb818 Improved: no functional change
Add a "missing" new line, I could not read the last one in Eclipse

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1856945 13f79535-47bb-0310-9956-ffa450edef68
2019-04-04 15:30:34 +00:00
Jacques Le Roux 9f36abe2c5 Fixed: EmailServices.sendMail causes a NPE, when sendFrom is missing
(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
2019-03-31 09:14:16 +00:00
Swapnil Mane 1879270595 Fixed: Missing oldStatusId in error when no status valid change record found
(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
2019-03-30 05:45:34 +00:00
Nicolas Malin 7a34878e51 Improved: Configure stackTrace displaying on ftl rendering
(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
2019-03-29 08:28:15 +00:00