(OFBIZ-9966)
I forgot to revert this part; I guess got conflict issues and then forgot.
I'll also revert in R16 and R17 and close as won't fix, I gave my arguments
that's enough for me.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824855 13f79535-47bb-0310-9956-ffa450edef68
(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
(OFBIZ-10223)
Tomcat provides a default ciphers definition better to use it and let Tomcat
handles that for us, we know Tomcat security is strong
Thanks: Paul Foxworthy for the help understanding the syntax :)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824316 13f79535-47bb-0310-9956-ffa450edef68
With this entity we can define some different widget screens available on the system (organised by type) to link with other entities for resolve a specific screen to use for a specific context (future actual case to implement, select a invoice pdf screen linked to a party) without framework modification
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1824274 13f79535-47bb-0310-9956-ffa450edef68
(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
(OFBIZ-10218)
While working on OFBIZ-9571 I found that getBigDecimalRoundingMode() returns
DEFAULT_BD_SCALE when the passed value for the file parameter is emtpy.
This has certainly be C/P from getBigDecimalScale() and never found before.
While at it I refactored a bit getBigDecimalRoundingMode() and
getBigDecimalScale()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823876 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10175)
Some of the remnants were still left. I got stuck with
JsLanguageFileMappingCreator, so changed other left outs too.
This also fixes OFBIZ-10113 - Replace Asm select plugin with Select2.
Thanks: Aditya
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823826 13f79535-47bb-0310-9956-ffa450edef68
Add zipFileStream method that will zip FileStream to a zipped one.
Add unzipFileToFolder method to unzip a given archive to a given Folder.
Add fileUtil groovy test suite that create zip file containing README.md, then unzip it to tmp folder and compare original and unzipped files.
Thanks Jacques for the review.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823567 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10206)
Updates the security.properties content related to JWT
Refers to the last up to date external-server-test-example.patch at OFBIZ-10206
Makes demo-trunk.ofbiz.apache.org default external-server-name so that anybody
can try the feature from own machine. The use-external-server=Y was already set
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823467 13f79535-47bb-0310-9956-ffa450edef68
convert services genericBasePermissionCheck, commonGetAllCrudPermissions and visualThemePermissionCheck from minilang to groovy.
The simple method genericBasePermissionCheck is maintain but indicate as deprecated in log to don't break direct call from other mini-lang script.
Thanks to Dennis Balkir for this patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1823397 13f79535-47bb-0310-9956-ffa450edef68
(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/trunk@1823324 13f79535-47bb-0310-9956-ffa450edef68
In a groovy service to call the security object you need to do : Security security = dispatcher.dispatchContext.security
For simplification, I set the security object in groovy context like dispatcher and delegator to call directly security.hasPermission()
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822908 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9833)
I just thought that for security it's best to have both the source and
target server using the use-external-server property.
Also default to N when requesting this property
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822882 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-1032)
This changes the label for more clarity. Actually there is not only inserts but
no replacements. Because you can also create and delete. This has been defined
after this label was created with OFBIZ-4949. So we have EntitySaxReader Action
enum and it's used in this this context.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822383 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-1032)
Karl:
Avoids rollback on create error to be able to store the entity instead
(previous mostly-inserts feature).
Matin:
I think, the data load with "mostly inserts" activated should fail on a
create-failure (what it does indeed already), so I see no need for a working
solution of a fallback store attempt. Consistently the Feature should be renamed
in the frontend from "mostly inserts" to "only inserts".
Kyra:
Additional trivial refactoring in the patch: I reduced the full qualified
classname of org.xml.sax.SAXException in method signatures to the simple name.
This incorperates the changes that Martin has mentioned above.
The unnecessary call to store() is removed, simplifying the process of creating
and deleting entities. (These changes were already in Martins old patch but had
the wrong format.) This means that the flag "mostly Inserts?" is not accurately
worded since as long as there is only create fail, all operations are rolled
back. So the second patch renames the flag and all appropriate parameters to
"onlyInserts".
jleroux: I made few no functional changes, apart not swallowing an exception
Thanks: Thanks Karl for the 1st patch, Martin to get further, and Kyra to
complete the whole with a final touch and help to quickly test
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1822310 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9169)
In OFBIZ-5409 a prefix was added for GET ajax requests.
It would be beneficial if the prefix could be configured instead of hard coded
jleroux: at r1777942 I missed the general.properties change
Thanks: Michael Brohl for reporting the issue
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821386 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10167)
As reported by Deepak on dev ML the returned name should be a parameter and not
enforced to "Authorisation"
This removes a wrong comment (no functional change)
Thanks: Deepak for bug report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821230 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10133)
No functional change in trunk
Slightly improves formatting in streamContent() in trunk.
Uses the same code in R16, notably for setting
byte[] buffer = new byte[bufferSize];
that guarantee no issues, and using try-with-ressource
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821054 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10133)
When ofbiz streams a large content (eg. video file), get out of memory exception.
To reproduce the issue see the Jira
jleroux: I just removed final for bufferSize, I see no needs for that local
variable
Thanks: Wai for the patch Michael for the discussion
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1821036 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10159)
The method findOne() which is set in the OfbizDslDescriptorForEclipse.dsld is
wrong, since there is no implementation for this method, which only has a String
and a List as parameters. I changed it to the correct method, so it can be used
within groovy properly, also I put an implementation in the GroovyBaseScriptFile
Thanks: Dennis Balkir
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820966 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10128)
The ofbiz_logo.png is now in theme. This is only the framework part.
I have also made change in theme but I need to review again and perhaps create
a patch for others to review...
Note: testUpdatePartyGroup is OK
Then I'll also rename the logo in site to use the same name before maybe
referring to svn trunk repo to use only 1 file everywhere, same for the .ico
file
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1820862 13f79535-47bb-0310-9956-ffa450edef68