Commit Graph
2421 Commits
Author SHA1 Message Date
Jacques Le Roux 0fb2991e16 FIxed: Replace Callable objects with lambda expressions
(OFBIZ-10488)

urlExists in UelFunctions is not used at all OOTB but its initialisation 
remained


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848674 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:49:51 +00:00
Jacques Le Roux bbfc62d47a Improved: Fix or Silence various warnings
(OFBIZ-10701)

In order to detect potential issues early, the linting compiler option should be 
used by default and disabled with {{./gradlew -PXlint:none build}}.

Additionally it is important to reduce the number of warnings otherwise new 
warnings will remain unnoticed.

The warning related to the com.googlecode.concurrentlinkedhashmap dependency 
should resolves itself once we handle upgrade to Caffeine like proposed in 
OFBIZ-6747.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1848673 13f79535-47bb-0310-9956-ffa450edef68
2018-12-11 13:33:49 +00:00
Jacques Le Roux a05421414d Fixed: Create a PoC for a documentation system for OFBiz based on Asciidoc
(OFBIZ-9873)

I wrongly added ServerTableEntryTest.java at some point, this removes it

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847891 13f79535-47bb-0310-9956-ffa450edef68
2018-12-01 12:35:17 +00:00
Jacques Le Roux 426df38d97 Fixed: Create a PoC for a documentation system for OFBiz based on Asciidoc
(OFBIZ-9873)

At r1831619 we committed a workaround to "turn off PDF in windows for now"

I have found a real solution for this bug which prevents to check PDF results in 
Windows because the PDF were not generated there.

I found this solution at 
https://github.com/asciidoctor/asciidoctorj-pdf/issues/8. 
After reading https://github.com/asciidoctor/asciidoctor-pdf/issues/850 
I checked it also works on Linux.

It uses the last version of jruby-complete.

I guess the gradle-versions-plugin should be able to warn us when an upgrade of 
jruby-complete is available like it does for junitReport.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847890 13f79535-47bb-0310-9956-ffa450edef68
2018-12-01 12:30:50 +00:00
Jacques Le Roux b31fd85dc1 Improved: Multi Part Input Parameters not Available in Groovy Event
(OFBIZ-5048)

If a form is of type enctype="multipart/form-data" and we are handling its 
submission through Groovy Event then in the parameters Map Ofbiz does not set 
the multipart input parameters from request parameters.

The same are available when multipart form submission is handled through service.

The reason being the code that sets the multipart parameters in request 
attribute is only available in ServiceEventHandler.java and in 
GroovyEventHandler the multipart are never set.

So I have created a method getMultiPartParameterMap in the class UtilHttp.java 
and put the common logic in that method so that when getCombinedMap method is 
called from the GroovEventHandler the method also call getMultiPartParameterMap 
and in the ServiceEventHandler I have written a call for 
getMultiPartParameterMap method.

Thanks: Vikramjit Singh for report and initial patch, Rohit Koushal for updated
and revised patch with some minor changes.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1847478 13f79535-47bb-0310-9956-ffa450edef68
2018-11-26 16:41:52 +00:00
Jacques Le Roux b0478d13f0 Improved: XML schemas should use predefined boolean type
(OFBIZ-10411)

To define boolean values, some ad-hoc enumeration of "true" and "false" are 
repeatedly used.  Since XML Schema defines a standard boolean datatype it's 
better to use it.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846727 13f79535-47bb-0310-9956-ffa450edef68
2018-11-16 16:38:24 +00:00
Aditya Sharma 780cc1af3e Fixed: Missing Security and Cache Headers in CMS Events
(OFBIZ-10597)
Instead of having multiple null checks for viewMap separately for each security header we can have a single combined null check at the top in setResponseBrowserDefaultSecurityHeaders() method.

With increasing security headers these may become expensive.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846632 13f79535-47bb-0310-9956-ffa450edef68
2018-11-15 10:40:55 +00:00
Jacques Le Roux c1d09961dd Improved: Clean some Groovy files in base component
(OFBIZ-10646)

Following discussion at https://markmail.org/message/y3izmnxd7jd6jbkf 
this cleans some Groovy files in the base component, notably:

* remove ant-scripts folder and its content.
* Rename framework/base/groovyScript to framework/base/groovyScripts;
* Move GroovyInit.groovy and GroovyServiceTest.groovy respectively to 
  framework/base/groovyScripts and framework/common/groovyScripts 
  and change their paths where used.
* Removes GroovyInit.groovy from excludedConfigFiles in build.gradle
* After OFBIZ-10611 it's possible to move GroovyBaseScript.groovy  from
  framework/service/src/main/java/org/apache/ofbiz/service/engine
  to
  framework/service/src/main/groovy/org/apache/ofbiz/service/engine
* Removes FileUtilTests.groovy from basetests.xml (missed it in OFBIZ-10611)
* Fixes a typo in test-suite.xsd

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846485 13f79535-47bb-0310-9956-ffa450edef68
2018-11-13 05:03:51 +00:00
Jacques Le Roux 7cc7fd2cea Improved: Allow unit tests to be written in Groovy
(OFBIZ-10611)

Since OFBIZ-9996 it is possible to write integration tests in Groovy, meaning 
test that depend on the dispatcher and the delegator. It would be nice if the 
unit tests could be written in Groovy too.

The major benefit of writing tests in Groovy is that you create inputs and 
expected outputs more easily with objects literals. 
For example the following java code:

Map<String, Integer> input = new HashMap<>();
  input.put("foo", 42);
  input.put("bar", 37);

can be rewritten in Groovy like this:
  def input = [foo: 42, bar: 37]

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846393 13f79535-47bb-0310-9956-ffa450edef68
2018-11-12 10:57:27 +00:00
Jacques Le Roux fceb3e087c Improved: remove deprecated and not used PhoneNumber functions
(OFBIZ-10631)

Several phone number validation functions have been deprecated (and are not used in framework code).
This concerns:
    isUSPhoneNumber
    isUSPhoneAreaCode
    isUSPhoneMainNumber
    isInternationalPhoneNumber

Thanks: Pierre Smits

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1846213 13f79535-47bb-0310-9956-ffa450edef68
2018-11-09 08:01:49 +00:00
Jacques Le Roux 03009b3c83 Fixed: Error in GetLocaleListTests.java
(OFBIZ-10641)

A test error related to GetLocaleListTests.java seems to happen only on a fresh 
trunk install when running unit tests. It's no stopping tests. 

I'm not sure yet if R17 is concerned. I did not try, but will 1st confirm with
this commit with trunk demo error.loç

Mathieu suggested to  replace the location 
component://base/config/GroovyInit.groovy 
with ofbizhome://framework/base/config/GroovyInit.groovy
because GroovyUtil [should not] depend on the component container in the 
1st place, and it seems to work.

Thanks: Mathieu for the idea.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845933 13f79535-47bb-0310-9956-ffa450edef68
2018-11-06 16:33:11 +00:00
Jacques Le Roux 102dd5d242 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Renames "keep-autologin-cookie" to "use-autologin-cookie", and only create 
Autologin cookies when needed. No need to create Autologin cookies in 
applications that don't need it.

Don't pass webAppName to LoginWorker::getSecuredUserLoginId, that can be handled
with improved LoginWorker::getSecuredLoginIdCookieName

Removes LoginWorker::autoLogoutCleanCookies, no longer needed since only those
needed are created and kept (1 year at least after creation).

For both autoLogin and securedLoginId cookies sets the path to the application.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845558 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 09:46:42 +00:00
Jacques Le Roux a1e28bf1e2 Fixed: ComponentConfig::getAppBarWebInfos creates infos only for components
without <<app-bar-display="false">>
(OFBIZ-10637)

LoginWorked::getAppBarWebInfos is used to define the apps menus in themes so we
need to also check that no menuName is passed to 
ComponentConfig::getAppBarWebInfos. Else all menus appears in the secondary menu
bars


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845552 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 08:48:31 +00:00
Jacques Le Roux da591d600d Fixed: ComponentConfig::getAppBarWebInfos creates infos only for components
without <<app-bar-display="false">>
(OFBIZ-10637)

It makes no sense since if the menuName var is empty the infos are returned.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845544 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 07:59:16 +00:00
Jacques Le Roux ff1d9bb77f Improved: no functional change, just some formatting
Thanks: Taher for review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845466 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 12:55:26 +00:00
Jacques Le Roux 115d59916d Fixed: Missing Security and Cache Headers in CMS Events
Fixed:
(OFBIZ-10597)

While rendering the view through the controller request we set the important 
security headers like x-frame-options, strict-transport-security, 
x-content-type-options, X-XSS-Protection and Referrer-Policy etc. in the 
response object. (Please see the 'rendervView' method of RequestHandler class.) 
 
In the similar line, we set the cache related headers like Expires, 
Last-Modified, Cache-Control, Pragma.
 
But these security headers are missing in the pages rendered through CMS. 
(Please visit the CmsEvents class).
 
These headers are very crucial for the security of the application as they help 
to prevent various security threats like cross-site scripting, 
cross-site request forgery, clickjacking etc. 

Thanks: Deepak Nigam for initial patch and review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1845418 13f79535-47bb-0310-9956-ffa450edef68
2018-11-01 09:36:35 +00:00
Gil Portenseigne 00f47d07dc Improved : Update missing entries in GDSL descriptors and cleanup findOne to use EntityQuery instead.
(OFBIZ-10566)

Deprecation of findOne DSL method in favor of entityQuery from DSL method

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840898 13f79535-47bb-0310-9956-ffa450edef68
2018-09-14 08:19:39 +00:00
Jacopo Cappellato 1d1b12400e Improved: Upgraded Freemarker to the latest stable version (from
2.3.27-incubating to 2.3.28).


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840828 13f79535-47bb-0310-9956-ffa450edef68
2018-09-13 14:49:25 +00:00
Jacques Le Roux a5fd3fd7eb Implemented: Implement Depends on support for Component Loading.
(OFBIZ-10368)

Components are loaded in the order they are found (i.e. alphabetic or creation 
date). 

Here is a feature which supports in ofbiz-component to create a series of 
dependencies for components loading, before loading a particular component.
We can define a dependency for a component, like component ebaystore is 
dependent on Component ebay (even multiple dependencies for a single component 
is supported). 

We can declare it in this fashion in ofbiz-component.xml file.
  <ofbiz-component name="ebaystore" enabled="true"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
  <depends-on component-name="ebay"/>

If any anomaly is found loading of components will stop.  

Thanks: Pradhan Yash Sharma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840141 13f79535-47bb-0310-9956-ffa450edef68
2018-09-05 16:29:48 +00:00
Jacques Le Roux e62d31667e Implemented: Implement Depends on support for Component Loading.
(OFBIZ-10368)

Components are loaded in the order they are found (i.e. alphabetic or creation 
date). 

Here is a feature which supports in ofbiz-component to create a series of dependency for component loading, before loading a particular component.
 
Here we can define dependency for a component like Component ebaystore is dependent on Component ebay (even multiple dependencies for a single component is also supported). We can declare it in this fashion in ofbiz-component.xml file.
 

<ofbiz-component name="ebaystore" enabled="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<depends-on component-name="ebay"/>

 
Now we can declare dependency and if any anomaly is found loading of components will stop.  

Thanks:

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1840139 13f79535-47bb-0310-9956-ffa450edef68
2018-09-05 16:23:04 +00:00
Shi Jinghai ddf3540817 Implemented: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

Thanks: Mathieu Lirzin for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1838081 13f79535-47bb-0310-9956-ffa450edef68
2018-08-15 11:45:45 +00:00
Gil Portenseigne ceea6ce791 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837577 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:30:43 +00:00
Taher A. Alkhateeb 22d780cdae Improved: Further refactor MapContext and MapStack
(OFBIZ-10485)

This commit applies multiple new refactoring enhancements as follows:
- rename stackList to contexts (the data structure holding the context Deque)
- refactor the size function to utilize streams to sum all keys
- Implement a function "entryStream()" that returns a stream of all keys in the
  correct sequential order and utilize this function in multiple functions for
  iterating over the keys including "containsValue", "values" and "entrySet".
  This implementation is necessary to avoid code repetition and ensure correct
  order with no duplicates
- Re-design the get functions of the context map to use a generic function with
  a functional interface "withMapContainingKey". The purpose of it is to avoid
  checking for nulls and instead use the "containsKey" function followed by the
  injected lambda expressions in both signatures of the get function

Thanks: Mathieu Lirzin for the patch and implementing suggested changes.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837462 13f79535-47bb-0310-9956-ffa450edef68
2018-08-05 12:36:09 +00:00
Taher A. Alkhateeb e534c3b3b7 Improved: refactored the MapContext object with multiple improvements
(OFBIZ-10485)

- Removed the constructor and factory method "getMapContext" as it was
  redundant and does not add any value
- Replaced manual for-loop for collection walking in multiple methods with
  simple stream calls applied declaratively with less noise in the code.
- Fully removed the ListSet custom data structure with as that data structure
  did not serve any meaningful purpose and it is always better to rely on
  the java builtin data structures where possible. Construction was replaced
  with a HashSet instead.

Thanks: Mathieu Lirzin for your time, discussions and patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1837409 13f79535-47bb-0310-9956-ffa450edef68
2018-08-04 08:39:16 +00:00
Taher A. Alkhateeb 2c4907a873 Improved: refactor the MapContext to use a Deque instead of List interface
(OFBIZ-10485)

The MapContext and MapStack classes are abstracting away the underlying
LinkedList implementation behind a List. The problem is that the push and pop
methods are implemented awkwardly by using index zero or using size() to find
the ends of the collection.

Thus this improvement maintains the same code signature but replaces the List
interface with the Deque to utilize the getFirst(), addFirst() and addLast()
functions making the code cleaner and more declaractive.

Thanks: Mathieu Lirzin for the patch and explanation of your work.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836710 13f79535-47bb-0310-9956-ffa450edef68
2018-07-26 10:02:06 +00:00
Taher A. Alkhateeb bf655a7d16 Improved: Add missing @override annotations in MapContext
(OFBIZ-10485)

Those are missing for methods that override super methods with identical signatures.

Thanks: Mathieu Lirzin for your patch and analysis


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836632 13f79535-47bb-0310-9956-ffa450edef68
2018-07-25 13:25:05 +00:00
Taher A. Alkhateeb a80c623fe7 Improved: Reafctor MapContext by removing unused code
(OFBIZ-10485)

- Remove unused functions that are only supposed to be used internally.
- Remove redundant warning and @override annotations

Thanks: Mathieu Lirzin for the patch, and careful analysis of code.
Thanks: Pradhan Sharma for reviewing the work


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1836631 13f79535-47bb-0310-9956-ffa450edef68
2018-07-25 13:21:32 +00:00
Shi Jinghai 17d9904b83 Reverted: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834917 13f79535-47bb-0310-9956-ffa450edef68
2018-07-03 06:21:02 +00:00
Shi Jinghai 68003b9526 Implemented: Add method attribute to request-map to controll a uri can be called GET or POST only
OFBIZ-10438

The request-map element has a new method attribute to control a uri be called by GET or POST or all.

Thanks: Mathieu Lirzin for the contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1834389 13f79535-47bb-0310-9956-ffa450edef68
2018-06-26 02:00:33 +00:00
Taher A. Alkhateeb d46a33a627 Improved: improve XML parsing with more restrictive settings
(OFBIZ-10435)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833708 13f79535-47bb-0310-9956-ffa450edef68
2018-06-18 12:23:44 +00:00
Jacques Le Roux affc8a17cc Improved: Remove UtilValidate::isEmpty(String) method
(OFBIZ-10412)

UtilValidate class contains a `isEmpty` method both for `CharSequence` and for 
`String` types but since the first is an interface for the other and that the 
implementation are the same we don't need to keep the one for the concrete type.

Additionnaly I have removed the unused Generic type for the remaining 
implementation.

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832170 13f79535-47bb-0310-9956-ffa450edef68
2018-05-24 13:36:08 +00:00
Jacques Le Roux 1840297cac Improved: Secure HTTP headers
(OFBIZ-6766)

After reading https://www.fastly.com/blog/headers-we-dont-want and more in the
Jira, only improves UtilHttp.setResponseBrowserProxyNoCache() by adding 
Cache-Control:private to avoid caching in proxy.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1832128 13f79535-47bb-0310-9956-ffa450edef68
2018-05-23 20:53:45 +00:00
Michael Brohl 9341c23b0f Reverted: Undo remove of test files in r1831567
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831846 13f79535-47bb-0310-9956-ffa450edef68
2018-05-18 10:48:44 +00:00
Gil Portenseigne a71f88b1ad Fixed : change OFBiz always log level to OFF log4j level, instead of using FATAL log4j level
(OFBIZ-6206)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831788 13f79535-47bb-0310-9956-ffa450edef68
2018-05-17 15:02:03 +00:00
Michael Brohl 5c547ae60e Fixed: Removed unnecessary class and folders.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1831567 13f79535-47bb-0310-9956-ffa450edef68
2018-05-14 13:34:03 +00:00
Deepak Dixit 645e6e1c47 Fixed: Fix typo 'paramters' => 'parameters'
(OFBIZ-10394)
Thanks Mathieu Lirzin for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830936 13f79535-47bb-0310-9956-ffa450edef68
2018-05-04 19:34:07 +00:00
Jacques Le Roux e551e6cf8d Improved: Generalize toMap to abitrary key types
(OFBIZ-10354)

The `toMap` static method doesn't use its 'K' generic type in its implementation

Thanks: Mathieu Lirzin

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1830588 13f79535-47bb-0310-9956-ffa450edef68
2018-04-30 13:30:35 +00:00
Gil Portenseigne 78bf31c937 Fixed: Convert README.md to README.adoc.
(OFBIZ-10272)

Complete Jacques Fix, replacing all README.md occurence with README.adoc.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827470 13f79535-47bb-0310-9956-ffa450edef68
2018-03-22 08:54:00 +00:00
Jacques Le Roux 6813d5d2b1 Fixed: Convert README.md to README.adoc.
(OFBIZ-10272)

Not sure why it went unnoticed so long, but by removing README.md 
(replacing README.adoc) r1827046 brokes testZipReadme

Not a big deal, we can just replace the file in the test (from README.md to 
README.adoc). We could chose a more sure to remain file, but I guess that now we 
are going with asciidoc and README.adoc should stay

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827457 13f79535-47bb-0310-9956-ffa450edef68
2018-03-22 05:30:39 +00:00
Nicolas Malin 73bd798dda Fixed: HttpClient failed to return the error result
(OFBIZ-10281)

When you call the HttpClient on Rest API on url that return you an error, the HttpClient failed to give you the error stream:
    callResult = restClient.getStream();

If the flow is an error in the catch block with the line 
    in = con.getInputStream();
that return a FileNotFoundException

To solve if, if the connexion is an instance of HttpURLConnection we resolve this error inputStream contains the error message

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1827212 13f79535-47bb-0310-9956-ffa450edef68
2018-03-19 16:04:21 +00:00
Jacques Le Roux d354300e69 Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

I used the only available (and I must say confusing) WebappInfo.getName() when
I needed the webAppName not the WebappInfoName. So this put in a new 
WebappInfo.getMountPoint() and use it in getWebappInfo

Also use LoginWorker.autoLoginSet() in different places where I missed it. In 
other words all autoUserLogin coockies are deleted on login and logout, and
an autoUserLogin cookie is created when going locally from a webapp to another,
with checkExternalLoginKey


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826938 13f79535-47bb-0310-9956-ffa450edef68
2018-03-16 09:35:06 +00:00
Michael Brohl 7bc137dd35 Improved: Extended UtilFormatOut with new method formatPercentageRate.
(OFBIZ-10199)

Thanks Martin for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826679 13f79535-47bb-0310-9956-ffa450edef68
2018-03-13 20:16:12 +00:00
Michael Brohl 1885f9a0a0 Improved: Change log level from INFO to VERBOSE for detail logging in
UtilCache.findSizeInByte
(OFBIZ-10200)

Thanks Martin Becker for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826597 13f79535-47bb-0310-9956-ffa450edef68
2018-03-12 22:08:42 +00:00
Michael Brohl aebec6aafc Fixed: UtilCodec URL decoding breaks values with german umlauts.
(OFBIZ-10275)

Thanks Martin Becker for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1826592 13f79535-47bb-0310-9956-ffa450edef68
2018-03-12 21:43:48 +00:00
Arun Patidar 51f51c1623 Improved:Update regex used for validating credit cards.
(OFBIZ-9761)
Thanks Amit Gadaley for your contribution and Michael Brohl for reviewing patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1825216 13f79535-47bb-0310-9956-ffa450edef68
2018-02-24 11:32:18 +00:00
Jacques Le Roux 84bc50b994 Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

Logout method do not disable autoLogin functionality. 
Instead of that it just initializes autoLogin in session and request.

jleroux: this was also needed by OFBIZ-10206 "Security issue in Token Based 
Authentication". 
This creates a keep-autologin-cookie boolean attribute in the webapp element of 
the  ofbiz-component.xml, documented in ofbiz-component.xsd
This attribute is used to get the value from the ofbiz-component.xml files in a
new autoLogoutCleanCookies() LoginWorker method. This method is used not only 
when login out but also when login in. This to be sure that in every cases the 
cookies related to the webapps are removed.
For now only the ecommerce, ecomseo et webpos webapps are keeping and using 
their autologin cookies

Thanks: Roberto Benítez Monje for report and Taher for discussion and suggestion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824803 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 19:23:36 +00:00
Jacques Le Roux f26b20885a No functional change, removes reference to MD5 in comments. It's not used anymore
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824128 13f79535-47bb-0310-9956-ffa450edef68
2018-02-13 12:51:30 +00:00
Jacques Le Roux 630d993a21 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

No functional change, just better JavaDoc 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824124 13f79535-47bb-0310-9956-ffa450edef68
2018-02-13 12:45:13 +00:00
Jacques Le Roux 6ce8dd89e3 Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

No functional change, simply better JavaDoc for deprecated 
getBigDecimalRoundingMode() methods

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824104 13f79535-47bb-0310-9956-ffa450edef68
2018-02-13 09:30:34 +00:00
Jacques Le Roux b06570590e Improved: [DEPRECATION] Replace BigDecimal.ROUND_* by RoundingMode.*
(OFBIZ-9571)

UtilNumber class
 Deprecates and replaces both getBigDecimalRoundingMode() by getRoundingMode()
 Deprecates toPercentString()
 Puts a log for a NumberFormatException

Calculate class
 Uses RoundingMode where necessary. No deprecation, this should be only used
 by Minilang

The rest
 Adapts the whole code for that
 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823931 13f79535-47bb-0310-9956-ffa450edef68
2018-02-12 10:04:29 +00:00