username and password in logs
(OFBIZ-9310)
In UtilHttp.getParameterMap(HttpServletRequest request, Set<? extends String>...
method, following line of code prints username and password in logs when verbose
is set to true.
Debug.logVerbose("Request Parameter Map Entries: " +
System.getProperty("line.separator") + UtilMisc.printMap(paramMap), module);
Aditya suggested:
Removed the line that prints "Request Parameter Map Entries" as it may print
username and password entered by user when verbose set to true.
It may not be a grave concern for staging environment as verbose are not logged
there but it is still unethical to print such details.
jleroux: I decided to rather comment out the line which might still be useful
in some cases...
Thanks: Aditya Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791346 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9273)
Problem:
When you enter
bq. gradlew createTenant -PtenantId=test
you get
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\projectsASF\ofbiz-framework\build.gradle' line: 764
* What went wrong:
A problem occurred evaluating root project 'ofbiz'.
> Could not get unknown property 'pluginId' for task ':installAllPlugins' of
type org.gradle.api.DefaultTask.
Investigation:
This issue is due creation of build.gradle file in plugin (with empty gradle
task defined in it)
Solution:
Comment out build.gradle template content
Thanks: Deepak for confirmation, Swapnil M Mane for the investigation and patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791143 13f79535-47bb-0310-9956-ffa450edef68
and ModelTreeAction classes
(OFBIZ-9287)
This 3 methods share a pattern which should be refactored in a common protected
method. The pattern is
{code}
if (!this.resultMapNameAcsr.isEmpty()) {
this.resultMapNameAcsr.put(context, result);
String queryString = (String) result.get("queryString");
context.put("queryString", queryString);
context.put("queryStringMap", result.get("queryStringMap"));
if (UtilValidate.isNotEmpty(queryString)) {
try {
String queryStringEncoded = queryString.replaceAll("&", "%26");
context.put("queryStringEncoded", queryStringEncoded);
} catch (PatternSyntaxException e) {
// obviously a PatternSyntaxException should not occur here
}
}
} else {
context.putAll(result);
}
{code}
Enough for a refactor I'd say.
I created a ModelActionUtil class where I extracted the method I used in the 3
other classes.
This also removes the swallowed exception that we had in ModelFormAction and
ModelTreeAction, but not in ModelActionUtil from where I extracted the method.
It's now consistent and if ever, for a very unlikely reason, the exception
is thrown, people will know about it and will take appropriate measures.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789737 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9285)
Provide log message after all containers/components are loaded.
This helps to inform new developer that OFBiz has started.
Thanks: Jacques and Taher for code review and mentoring.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789533 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8341)
Obviously a PatternSyntaxException should not occur there.
So I simply put a comment to document the fact even it it seems obvious.
I note though that the repeated pattern is a smell for refactoring...
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789163 13f79535-47bb-0310-9956-ffa450edef68
<<With code like the above, I think that embedding everything in the try
clause makes the code a bit less readable. One option would be to split the
entity query code in two lines>>
I used this suggestion on all locations it made sense. In few places it was
better to let it as is; separating would rather make the code a bit less
readable.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1788263 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
(OFBIZ-9196)
Disabled the admin server from starting on contexts other than "start"
This commit has reference to the below discussion thread in which buildbot
is failing in between commits due to blocking the admin server thread.
The commit enables the admin server only for the "start" ofbiz server command.
For all other commands the port is set to value zero and hence the admin server
is never initialized
https://s.apache.org/xfxS
Thanks: Taher for the fix
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787627 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7473)
Go to Webtools -> Import/Export -> Induce Model XML from Database
(https://localhost:8443/webtools/control/view/ModelInduceFromDb)
An exception is thrown: javax.servlet.ServletException: File
[/entity/ModelInduceFromDb.jsp] not found.
jleroux: after moving FTL template to the template sub-dir we forgot links
in the ctrlr. Changing the ctrlr is the best way.
Thanks: Thanks Gopal Yadav for the report . William Wang for the real cause
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787535 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9268)
The hot-deploy removal was discussed at https://s.apache.org/7Y2w
This completes the previous commit at r1787461
Note:
We need to remove or implement with Gradle the "depends-on" feature in
ofbiz-component files
IMO, the applyOfbizPatchesAndHotDeploy.sh and svnUpHotdeploy.bat scrupts should
be removed, done
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787473 13f79535-47bb-0310-9956-ffa450edef68
countries
(OFBIZ-9261)
This is handled in LabelManagerFactory.java
Element valueElem = (Element) valueNode;
// Support old way of specifying xml:lang value.
// Old way: en_AU, new way: en-AU
String localeName = valueElem.getAttribute("xml:lang");
if( localeName.contains("_")) {
localeName = localeName.replace('_', '-');
}
I replaces this snippet by throwing an exception in order to now to
automatically detect issues
Moreover I notices that there are no longer reasons to bypass the
ExampleEntityLabels and ProductPromoUiLabels files
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787047 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9260)
This is not really a bug because IIRW, for historical reason, we handle both in
labels management. But this is really a problem when you use the "Validate"
option in Eclipse. Because those errors add to others and make complicate to
spot important issues in XML code.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1787024 13f79535-47bb-0310-9956-ffa450edef68
have any impact during tests
It's not strange, it's documented (I did it but forgot):
"this can be used only against trunk demo and is not in the tests set to avoid a dependency on Internet"
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1786214 13f79535-47bb-0310-9956-ffa450edef68
does not compare certain values correctly
(OFBIZ-6386)
compareBigDecimals scales down and rounds up meaning you lose information and
the comparison result is not as expected
Thanks: Gareth Carter for the patch, Mridul Pathak and Jacopo for discussing the
topic in all details (see the Jira issue)
I'm not yet sure but maybe this has revealed some hidden issues in test, see https://ci.apache.org/projects/ofbiz/logs/trunk/html/
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1786079 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9230)
This has been temporarily fixed with r1784259. After a discussion on dev ML and
a code analysis reported in the Jira issue, I decided to follow Rishi Solanki's
idea of using the delegatorName.
Since we have no context when executing a macro in the widget form, I decided
to pass it to the macro. I had though to create an
EntityUtilProperties.getPropertyValueFromDelegatorName() method to eventually
pass the delegatorName. Two macros were concerned renderLookupField and
renderTextField.
Note: while analysing the code I found that EntityExpr.checkRhsType() can face
a related kind of problem. I'll commit an improvement later...
Thanks: Wai for report and discussion and Rishi for pursuing his idea of using
the delegatorName
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1785882 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9206)
After my conclusions at OFBIZ-9240 I decided to reapply the changes and will
test on demos.
Because WebSiteProperties reuse the port initially found in the 1st login URL
I tried to replace locally
port.https=8443
by
port.https=
in url.properties (w/o SystemProperty) and did not face any issue but with
portOffset. This is due to how the WebSiteProperties class works and there is also
an easy fix: don't add twice the portOffset when it's build from the request,
and only then. Keep it as is when it's build from a WebSite GenericValue.
We then trust the user and don't rely on the request.
I also removed the deprecated RequestHandler.getDefaultServerRootUrl()
I think it was time...
Thanks: Pierre Smits for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784930 13f79535-47bb-0310-9956-ffa450edef68
No functional change, cleaner code
........
No functional change, fixes a typo
........
Fixed: "Login and logout process in demos shows a certificate issue"
(OFBIZ-9206)
Also fixes "16.11 ofbizUrl include host+port and break some reverse-proxy/docker
setups"
(OFBIZ-9224)
It was an easy fix, I just imported
<SystemProperty systemPropertyId="port.https" systemResourceId="url"
systemPropertyValue=""/>
in trunk demo and all work perfectly.
I also tried to replace locally
port.https=8443
by
port.https=
in url.properties (w/o SystemProperty) and did not face any issue but with
portOffset. This is due to the WebSiteProperties class works and there is also
an easy fix: don't add twice the portOffset when it's build from the request,
and only then. Keep it as is when it's build from a WebSite GenericValue.
We then trust the user and don't rely on the request.
I also removed the deprecated RequestHandler.getDefaultServerRootUrl()
I think it was time...
Thanks: Pierre Smits and Leonard Lin for reports
........
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784760 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-9206)
Also fixes "16.11 ofbizUrl include host+port and break some reverse-proxy/docker
setups"
(OFBIZ-9224)
It was an easy fix, I just imported
<SystemProperty systemPropertyId="port.https" systemResourceId="url"
systemPropertyValue=""/>
in trunk demo and all work perfectly.
I also tried to replace locally
port.https=8443
by
port.https=
in url.properties (w/o SystemProperty) and did not face any issue but with
portOffset. This is due to the WebSiteProperties class works and there is also
an easy fix: don't add twice the portOffset when it's build from the request,
and only then. Keep it as is when it's build from a WebSite GenericValue.
We then trust the user and don't rely on the request.
I also removed the deprecated RequestHandler.getDefaultServerRootUrl()
I think it was time...
Thanks: Pierre Smits and Leonard Lin for reports
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784549 13f79535-47bb-0310-9956-ffa450edef68
framework/widget/templates/HtmlFormMacroLibrary.ftl"
(OFBIZ-9230)
To reproduce
1. Load test data <SystemProperty systemResourceId="widget"
systemPropertyId="widget.autocompleter.defaultMinLength"
systemPropertyValue="3"/>
2. Open https://localhost:8443/partymgr/control/main
3. You will still get warning below in log file
|EntityUtilProperties |I| Could not get a system property for
widget.autocompleter.defaultMinLength : null
jleroux: the reason is in the context of a FTL macro we lose the delegator
(in context) when calling
executeMacro(writer, sr.toString());
from
MacroFormRenderer.renderTextField()
So we need to find a way to pass the delegator to be used when evaluating
the Freemarker template. For now I have simply added a clearer explanation
of the reason.
Thanks: Wei Zhang for report
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1784259 13f79535-47bb-0310-9956-ffa450edef68
Replace the current groovy and ftl form rendering by a dynamic call to screen xml with build the xml form by analyse the entity
The find operation is now realize by the perfomFind service
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1783427 13f79535-47bb-0310-9956-ffa450edef68