The SOAP and HTTP engines are open doors to security issues.
At https://markmail.org/message/pgtjyh23bazq4s2w I proposed to comment them out
as we did for RMI in the past.
Of cause it must be clearly documented how to use them if needed.
Here is the email content:
After the recent fix for the CVE-2021-26295[1] we discussed with the security
team about the opportunity need to comment out the SOAP and HTTP engines
like we did in the past for RMI[2], this obviously for security reason.
[1] OFBIZ-12167 "Adds a blacklist (to be
renamed soon to denylist) in Java serialisation (CVE-2021-26295)"
[2] OFBIZ-6942 "Comment out RMI related
code because of the Java deserialization issue [CVE-2016-2170] "
I just put a small comment in webtools controller, it should be enough.
The tests pass
(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
(including admin) via 'Forget Your Password'
(OFBIZ-4361)
Trunk backport r1866478 and r1866518
Currently, any user (via ecommerce 'Forget Your Password') has the ability to
reset another users password, including 'admin' without permission.
By simply entering 'admin' and clicking 'Email Password', the following is
displayed:
The following occurred:
A new password has been created and sent to you. Please check your Email.
This now forces the user of the ERP to change their password.
It is also possible to generate a dictionary attack against ofbiz because there
is no capta code required. This is serious security risk.
I have modified the patch following comments I made in the Jira, notably
Removed unused Java variables
Removed a check in LoginEvents::forgotPassword which prevented to show error
messages
Changed fr and en SecurityExtPasswordSentToYou
+ SecurityExtThisEmailIsInResponseToYourRequestToHave labels
+ template PasswordEmail.ftl
+ loginservices.token_incorrect labels
Added fr and en SecurityExtIgnoreEmail + SecurityExtLinkOnce labels
Removed changes in general.properties
I did not remove the 2 GetSecurityQuestion.ftl files (webpos one was still in)
There is still room for improvement. I'll discuss them on the Jira and dev
ML. But this version is already strong enough to not wait that the patch is
inapplicable!
Thanks: mz4wheeler (Mike Z) for the Jira, Nicolas Malin for the patch, I guess
with some Gil's help, and all others for comments and ideas
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867296 13f79535-47bb-0310-9956-ffa450edef68
------------------------------------------------------------------------
r1859800 | jleroux | 2019-05-23 18:36:37 +0200 (jeu. 23 mai 2019) | 8 lignes
Fixed: Replace request-redirect w/ no redirect-param attribute by
request-redirect-noparam
(OFBIZ-9997)
Reverts all the rest from r1816180, and, after reading carefully the code used
for "request-redirect" in RequestHandler (and downward), fixes the documentation
in site-conf.xsd
------------------------------------------------------------------------
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859801 13f79535-47bb-0310-9956-ffa450edef68
===
Fixed: Error parsing JWT
(OFBIZ-10814)
Fixes incorrect retrieval of the Authorization header JWT token.
Fixes wrong API usage for the key parameter which assumed the key is
provided in BAS64 format.
Refactored the code to use helper methods for key and auth header
retrieval.
Javadoc corrections and enhancements.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852884 13f79535-47bb-0310-9956-ffa450edef68
authentication
(OFBIZ-10307)
This uses a JWT Token authentication to get from one domain, where you are
signed in, to another domain where you get signed in automatically.
Something like ExternalLoginKey or Tomcat SSO, but not on the same domain.
In the example component, the FormWidgetExamples screen contains 2 new fields
in the LinksExampleForm which demonstrate the use from a local instance to the
trunk demo instance.
A simple documentation is available in
framework\webapp\src\docs\asciidoc\_include\wa-cross-domains-SSO.adoc
Thanks: Taher for review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844880 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10608)
As documented, currently
Reserved for future use (not used yet).
I checked, it's still not implemented. So no need to confuse people for now,
better to remove until it's really used.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1844744 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10515)
Introduce a new feature that allow the impersonation of a login by an authorized user.
Add the documentation with all the details in security-impersonation.adoc.
Big thanks to Leila, Nicolas and Jacques for your contribution to this implementation.
Big thanks to Mathieu, Jacques, Pierre and Taher for your remarks and reviews that
improved this contribution quality.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1842110 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10472)
At the same time renames setLocaleFromBrowser to SetTimeZoneFromBrowser
everywhere it's needed
And adds a documentation about the auth mismatch as suggested by Mathieu
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835628 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10460)
The setLocaleFromBrowser request map defined in common-controller.xml has an
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml
has an attribute of auth=true.
jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
"it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere
Thanks: as reported by Deepak in OFBIZ-10460 there is a problem with that.
So we need keep the inconsistence and the service protected.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835616 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-10460)
The setLocaleFromBrowser request map defined in common-controller.xml has an
attribute of auth=false
While the service associated with it in framework/common/servicedef/services.xml
has an attribute of auth=true.
jleroux: this was missing in the initial patch. At OFBIZ-9264 the description is
"it sets the time zone of the user logged in to it's browser time zone."
So being logged in seems needed, hence better to set auth=true everywhere
Thanks: Mathieu Lirzin for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1835586 13f79535-47bb-0310-9956-ffa450edef68
authentication
(OFBIZ-10307)
This reverts the work done previously for OFBIZ-9833 and OFBIZ-10206
Most parts of it will actually be reused later in a patch. By reverting it will
allow to provide a patch for others to review
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1833510 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9833)
I have tested the Token Based Authentication between my local machine and the
trunk demo. It works as expected.
This completes the previous commit by:
adding a new externalServerLoginCheck pre processor
Documenting how to set the ExternalServerJwtMasterSecretKey in production
using sed and uuidgen
Adding documenting properties in security.properties, not set to be used OOTB
but ready to be set in production
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1814363 13f79535-47bb-0310-9956-ffa450edef68
Updated label from remove to expire while removing security group from user login, also added new entity-auto service to expire user login security group record.
Thanks S. Yazied for reporting the issue.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1803561 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
tokens from the LoginWorker class to a new class named ExternalLoginKeysManager.
Improved Javadocs in the new class.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1775807 13f79535-47bb-0310-9956-ffa450edef68
jleroux: I updated the patch. I fixed things by hand: tabs in the groovy files, removed the ftl file because of a tree conflicts due to the recent ftl files move and updated org.ofbiz to org.apache.ofbiz in CertKeystore.groovy
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1753024 13f79535-47bb-0310-9956-ffa450edef68
This is the 2nd step: puts back the original names, so it will be transparent for remaining references in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749489 13f79535-47bb-0310-9956-ffa450edef68
This is a 1st step, in a 2nd I will put back the original names, so it will be transparent for remaining reference in xml catalogs, Java code, etc.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1749488 13f79535-47bb-0310-9956-ffa450edef68
I removed duplicate paths were componentname was uselessly repeated after component://componentname/script/org/ofbiz (projectmngr was the only one using there project instead)
I had few typos, easily fixed thanks to the tests. There could be still typos but they are unexpected and anyway no-brainer to fix
I'm still wondering about specialpurpose/example/minilang/README.txt.
I changed its content to
"The minilang directory is for static resources that are interpreted at run time rather than being compiled. This goes on the classpath, but does not get built or put into a JAR file."
not sure it makes any sense, I don't see how this relates to the classpath.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1747712 13f79535-47bb-0310-9956-ffa450edef68
In addition, add an export example button on FindExample screen and add complete macro ftl renderer unit test. Issue OFBIZ-6931 proposed by Leila Mekika. Thanks to her, jacques and pierre for theirs remarks.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1746045 13f79535-47bb-0310-9956-ffa450edef68
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue is used in several .ftl files.
Replaces with EnittyUtilProperties variant where appropriate.
jleroux: In this is the 2nd commit from the 3rd patch (the 2nd had issues) I fixed 2 "typos" I spotted while reviewing in
ecommerce/customer/editcontactmech.ftl
ecommerce/customer/newcustomer.ftl
where "UtilProperties" was not replaced
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1729002 13f79535-47bb-0310-9956-ffa450edef68
Static["org.ofbiz.base.util.UtilProperties"].getPropertyValue is used in several .ftl files.
Replaces with EnittyUtilProperties variant where appropriate.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1728959 13f79535-47bb-0310-9956-ffa450edef68
jleroux: the issue description is quite lengthy so I will summarise it here, please refer to the Jira issue for details.
"When a customer creates an account on eCommerce site, s/he will also need to answer a security question. This security question then can be used by the user to reclaim her/his account in case s/he forgets her/his password. If the user correctly answers the required security question while reclaiming her/his account, her/his password will be sent through email notification. This part would work in the same way as the existing functionality of email password (forget password)."
The description was actually more ambitious (several questions, possibility for users to create own questions) but AFAIK these parts have not been implemented.
Apart updating the patch which did not merge, I got 2 majors issues (and few others I will not report here) I bypassed with workarounds.
Unlike Harsha, and as I reported earlier in the issue, I never got the username (userLoginId) back when using hidden parameters in the request body (not in requestParameters, ie UtilHttp.getParameterMap(request)), nor actually any parameters. This is maybe due to my OS (Windows7 was XP before) or my email client (Outlook Express then, now Thunderbird) or even my SMTP configuration (I used my ISP SMTP server) but most probably because I did it all on my sole machine (localhost). I tried to understand what was happening to request body parameters with http://www.telerik.com/fiddler, but finally gave up because it's even more complicated when https is in the picture. So I decided to rather use parameters in the URL (Query string). It's a bit less safe, though the password is OFBiz encrypted, and should be replaced. But it's safe enough because only the user should receive this message and even if the message is sniffed during its journey it should be hard to decrypt the password!
Harsha used the SecurityExtUiLabels.xml (created by ashish at r1618415) in securityext component but there is already a SecurityextUiLabels.xml in common component. Since I use Windows OFBiz was unable to retrieve the labels from SecurityExtUiLabels.xml since I guess it looked into a SecurityextUiLabels.xml. So I renamed a SecurityExtUiLabels.xml to EmailPassword.xml.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1716915 13f79535-47bb-0310-9956-ffa450edef68
Currently only a list of geoPoints is shown. The user experience will improve when we not only show that, but a map as well.
jleroux:
I refactored the js scripts in party editGeoLocation.ftl and added webtools GeoLocation.ftl into a new common GoogleGeoLocation.ftl template now included in both party editGeoLocation.ftl and webtools GeoLocation.ftl
I also removed trailing blanks in common GeoLocation.ftl template.
I also added a French label
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1713627 13f79535-47bb-0310-9956-ffa450edef68
I've been working on Jgrowl integration for a project. (https://github.com/stanlemon/jGrowl)
This allowS to display system's messages in a popup at the top of the windows even if you scroll. This is also useful for ajax call because there is no need to scroll to the top of the screen to view message.
Message can stick to the screen until it is intentionally closed by the user or not.
jleroux? as already explained in the Jira: to have it working in trunk HEAD I had to make some changes
I put the jgrowl loading in GlobalActions rather than GlobalDecorator
in showjGrowl() js function
I Added a test for if (contentMessages.length) because of an error in lookups
I did some formatting in function showjGrowl()
I used jQuery instead of $ (same for expandAllP() and expandAll() functions)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1709679 13f79535-47bb-0310-9956-ffa450edef68
1. Add zxing-core-3.2.0.jar to framework/base/lib and .classpath.
2. Add services_qrcode.xml and QRCodeService.java in framework/common/.
3. Add qrcode request in common-controller.xml and QRCodeEvents.java under framework/common/.
4. Add qrcode.properties and QRCodeUiLabels.xml under framework/common/.
5. Add a barcode example page in specialpurpose/example, entry is on page: /example/control/EditExample?exampleId=EX01, the example can be seen on page: /example/control/ExampleReportPdfBarcode?exampleId=EX01
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1696921 13f79535-47bb-0310-9956-ffa450edef68
When widget verbose is set to false and using field lookup, the description of the selected object is not displayed (not using auto completion but the popup).
To reproduce : Set widget.verbose=false in framework/widget/config/widget.properties
Clear OFBiz cache then go to : https://localhost:8443/partymgr/control/EditPartyRelationships?partyId=Company
In the partyRelationship creation form, in party Id From field, click on lookup, search, select AUTHOR_MADMAX, and so no description displayed. Using autocompletion it's fine.
jleroux: This reverts the previous patch from Gil. It did not occur to me that all the rest of the result was only commented out HTML code, so a simple trim was enough. Happy to get rid of this ugly kludge
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1680881 13f79535-47bb-0310-9956-ffa450edef68