(OFBIZ-10458)
A new Junit test is implemented to validate that no duplicates are present.
Groovy service has been refactored to use a more functional style
Thanks Mathieu Lirzin for reporting and providing the patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1835283 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1823324 | jleroux | 2018-02-06 14:17:57 +0100 (mar., 06 févr. 2018) | 26 lines
Fixed: Security issue in Token Based Authentication
(OFBIZ-10206)
The version I committed so far in OFBIZ-9833 has a small security issue.
See the Jira description for all details
To test I have attached a OFBIZ-10206-external-server-test-example.patch to
the Jira
This removes the external-server-query property now useless
In ContextFilter the getHeader (wrapper) now uses an autoLoginCookie to get
the userLoginId passed in the JWT instead of externalServerUserLogin parameter.
A sourceServerWebappName parameter must be passed from the client request to
allow reading the autoLoginCookie.
This userLoginId is then retrieved on the target server from the JWT in the
externalServerLoginCheck which is simplified.
In LoginWorker
getAutoLoginCookieName() has now 2 versions to allow to pass a webappname
A new autoLogoutFromAllBackendSessions() method has been added but for now
commented out. Decommenting it out will be submitted as a patch in OFBIZ-4959.
Thanks: Leila Mekika for reporting the security issue directly to me
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release17.12@1823325 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9833)
This works the same way than externalLoginKey but between 2 servers,
not 2 webapps on the same server.
The Single Sign On (SSO) is ensured by a JWT token, then all is handled as
normal by a session on the reached server. The servers may or may not share a
database but the loginUserIds on the 2 servers must be the same.
OOTB the JWT masterSecretKey is not properly initialised and can not be OOTB.
As we sign on on several servers, so have different sessions, we can't use the
externalLoginKey way to create the JWT masterSecretKey.
The best way to create the JWT masterSecretKey is to use a temporary way to load
in a static final key when compiling. This is simple and most secure.
One of the proposed way is to use sed and uuidgen to modify the masterSecretKey
value. The magic words here are TEMPORARY and FINAL!
I have not tested this between 2 servers yet, only locally where it works well.
I'll do after this commit between my local instance and the trunk demo.
Thanks: Nicolas for the sed ans uuidgen suggestion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1813679 13f79535-47bb-0310-9956-ffa450edef68
When a sendOrderConfirmation runs it calls InitTheme.groovy. But then there is no request and InitTheme fails
The script was improved to escape if the request is empty and try before to resolve the visualThemeId from the context
Tanks Jacques for the catch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1811042 13f79535-47bb-0310-9956-ffa450edef68
Five step WARNING these step is separate on many commit break all the UI
#1 Prepare the common screens to retrieve widget.properties, VisualThemeRessources and common screen location from the modelTheme
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806137 13f79535-47bb-0310-9956-ffa450edef68
Third step, move macro ftl libraries and ftl template present on framework common to common theme
At this step, the common-theme is forced like the common component previously.
Main common screens present on CommonScreens.xml, LookupScreens.xml and HelpScreens.xml are moved to common screen with a forced rewrite to common-theme
Warning this commit is going to follow with a other commit for CommonScreens.xml because LookupScreens.xml and HelpScreens.xml are recreated on common-theme, but to keep the history of CommonScreens.xml it was moved entirely, the second commit restore it with redirect call.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1806091 13f79535-47bb-0310-9956-ffa450edef68
I found an inconsistency in the code for string comparison statusId.equals("PRUN_COMPLETED") whereas it should be written as "PRUN_COMPLETED".equals(statusId) cause the former can throw NullPointerException if the variable found to be NULL.
Thanks Devanshu Vyas for your contribution.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1795342 13f79535-47bb-0310-9956-ffa450edef68
local browser.
(OFBIZ-9264)
If a time zone is already set for a user, this new feature won't override it.
The user still can set it's own time zone, but if it isn't set,
this avoids the time zone set to the default of the server.
jelroux: the momentjs license is MIT
Thanks: Francis Douet
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1788256 13f79535-47bb-0310-9956-ffa450edef68
At http://markmail.org/message/ffmyw773p65fndey I wrote:
I'd like to follow the suggestion I made in the last message of the linked
thread.
In other words, use
http://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-confighttp://blogs.collab.net/subversion/the-road-to-repository-dictated-configuration-day-2-autoprops
Then this problem would be over. No longer need to check from time to time that
concerned files, have svn:eol-style=native property set
This imply that all OFBiz users use svn > 1.7, but we can inform them, et voilà
Then at markmail.org/message/h3q2yvj4db544ro7 I wrote:
Actually, since we get new committers now and then and their are able to create
new files I have a warning every 6 months which says "Check Java
files, have all svn:eol-style=native" (I totally forgot that because I assume
the machine knows it and warns me ;))
I could extend that to all files (at least the most prominent types), I'll
see...
This does what the last sentence said for Groovy, XML and few new Birt
Java files.
I'll see if I can implement the svn 1.8 repos-dictated-config ASAP!
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1781219 13f79535-47bb-0310-9956-ffa450edef68
To automatically filter on fromDate thruDate attribute with value now, init a condition map like
<set field="conditionDates.default" value="Y"/>
To use specific attribute date with value now
<set field="conditionDates.fromDateName" value="startDate"/>
<set field="conditionDates.thruDateName" value="endDate"/>
To use an other value than now
<set field="conditionDates.filterByDateValue" from-field="invoice.invoiceDate"/>
or
<set field="conditionDates.filterByDateValue" value="2016-01-01 00:00:00" type="Timestamp"/>
You can also set only low border date
<set field="conditionDates.fromDateName" value="fromDate"/>
Or you can also set only high border date
<set field="conditionDates.thruDateName" value="endDate"/>
Thanks to Kongrath Suankaewmanee for the proposition follow on issue OFBIZ-7266
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1750856 13f79535-47bb-0310-9956-ffa450edef68