screen
Improved:
(OFBIZ-7850)
1. Go to Find Forum group list page
https://localhost:8443/content/control/findForumGroups
2. Select one of the Forum from the available forum list.
3. On this Forum Group page, In Add Forum and List Forums section, the UI label
From Date Time displayed "From Date & Time", it should be corrected to
display From Date Time.
jleroux: patch obsolete, I had to change things by hand
Thanks: Gopal Yadav
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791473 13f79535-47bb-0310-9956-ffa450edef68
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-9314)
Steps to reproduce:
Go to workEffort component.
2) Create a new task from New Task button
https://localhost:8443/workeffort/control/mytasks .
3) After creating Task with required fields, click on parties tab.
4) Screen for WorkEffort Party Assignment will be displayed.
5) Choose any party and role.
6) Click on Add. Error will be displayed.
Solution:
Any party is assigned to a WorkEffort on specific role, hence it is necessary
that party should be in that role first (PartyRole).
Added code which make sure the party should be in given role (i.e service call
to ensurePartyRole).
Thanks: Jagpreet Kaur
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1791277 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
(OFBIZ-9313)
Quoting a message from announce@apache.org
================================================================================
VE-2017-5648 Apache Tomcat Information Disclosure
Severity: Low
Vendor: The Apache Software Foundation
Versions Affected:
Apache Tomcat 9.0.0.M1 to 9.0.0.M17
Apache Tomcat 8.5.0 to 8.5.11
Apache Tomcat 8.0.0.RC1 to 8.0.41
Apache Tomcat 7.0.0 to 7.0.75
Apache Tomcat 6.0.x is not affected
Description
While investigating bug 60718, it was noticed that some calls to
application listeners did not use the appropriate facade object. When
running an untrusted application under a SecurityManager, it was
therefore possible for that untrusted application to retain a reference
to the request or response object and thereby access and/or modify
information associated with another web application.
Mitigation:
Users of the affected versions should apply one of the following
mitigations:
- Upgrade to Apache Tomcat 9.0.0.M18 or later
- Upgrade to Apache Tomcat 8.5.12 or later
- Upgrade to Apache Tomcat 8.0.42 or later
- Upgrade to Apache Tomcat 7.0.76 or later
Credit:
This issue was identified by the Tomcat security team.
History:
2017-04-10 Original advisory
References:
[1] https://bz.apache.org/bugzilla/show_bug.cgi?id=60718
[2] http://tomcat.apache.org/security-9.html
[3] http://tomcat.apache.org/security-8.html
[4] http://tomcat.apache.org/security-7.html
================================================================================
It's a low security issue so I'll not backport on no longer or not released
branches
All tests pass and UI seems OK.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790943 13f79535-47bb-0310-9956-ffa450edef68
Find Content page
(OFBIZ-9279)
How to reproduce :
1. Log in the Content component
2. Go to the Content tab. https://localhost:8443/content/control/findContent
3. In the search form, open the lookup of the field ' Owner Content Id '
4. Click on any of the table header links to sort the table. Results will be
displayed on a new unstyled window closing the Lookup dialog.
Problem:
1. Lookup dialog for ownerContentId uses "ListLookupContent" form to list
Content records.
2. "ListLookupContent" form extends "ListContent" form for all the fields.
3. Sort-field is set to true in "ListContent" form for all the fields.
4. Sort-field adds <a> hyperlink to "LookupContent" .
5. When clicked <a> link it moves to a new page and doesn't renders the response
in the Lookup dialog.
Solution:
First of all it is a lookup to select ownerContentId so as the pattern followed
in other lookups in OFBiz it should not have any sort-fields.
To set it false, it should be overridden. If all fields needs to be overridden
it is better not to extend "ListContent" form and add these fields right away.
Apart from that added 'header-row-style="header-row-2"' to form.
Thanks: Aditya Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789874 13f79535-47bb-0310-9956-ffa450edef68
Find Content page
(OFBIZ-9280)
How to reproduce :
1. Log in the Content component
2. Go to the Content tab. https://localhost:8443/content/control/findContent
3. In the search form, open the lookup of the field ' Data Resource Id '
4. Click on any of the table header links to sort the table. Results will be
displayed on a new unstyled window closing the Lookup dialog.
Problem:
Problem:
1. Lookup dialog for dataResourceId uses "ListLookupDataResource" form to list
Data Resource records.
2. "ListLookupDataResource" form extends "ListDataResource" form for all the
fields.
3. Sort-field is set to true in "ListDataResource" form for all the fields.
4. Sort-field adds <a> hyperlink to "LookupResource" .
5. When clicked <a> link it moves to a new page and doesn't renders the response
in the Lookup dialog.
Solution:
First of all it is a lookup to select DataResourceId so as the pattern followed
in other lookups in OFBiz it should not have any sort-fields.To set it false,
it should be overridden. If all fields needs to be overridden it is better not
to extend "ListDataResource" form and add these fields right away.
Apart from that added 'widget-style="smallSubmit"' to dataResourceId according
to the uniform pattern followed.
jleroux: I added the header-row-style="header-row-2" style
Thanks: Aditya Sharma
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789863 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
Michael suggested in dev ML that we don't show the error in UI because VIEW_SIZE
is only technical, which I agree with. The log is enough.
Actually it was already the case because I missed to move the
if (errMsgList) {
request.setAttribute("_ERROR_MESSAGE_LIST_", errMsgList)
}
block below the now caught NumberFormatException
So I just need to remove the 2nd line in the catch, done.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789736 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-8341)
While working on OFBIZ-7759, I stumbled upon this by chance.
It's unlikely that this NumberFormatException is ever caught, but not a reason
to swallow it.
I checked there are no other swallowed exceptions in Groovy files.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789710 13f79535-47bb-0310-9956-ffa450edef68
(OFBIZ-7759)
How to reproduce :
- Log in the Content component
- Go to the Content tab
- In the search form, open the lookup of the field ' Owner Content Id '
- Click on the search button
- In the result list, click on a button link in the column 'Data Resource Id'
- The form to edit the Content will be displayed (a whole OFBiz seems to be
accessible from this new page)
- Close the lookup.
- Try to reopen it, it doesn't show anything anymore.
Problem:
1. Lookup dialog for ownerContentId uses "ListLookupContent" form to list
Content records.
2. "ListLookupContent" form extends "ListContent" form for all the fields.
3. As fields dataResourceId and ownerContentId are extended fields they creates
a link to Edit pages.
Solution:
First of all it is a lookup to select ownerContentId so as the pattern followed
in other lookups in OFBiz it should not have any links to Edit page. If links
are removed there will not be the problem as well.
Apart from that added 'widget-style="smallSubmit"' to contentId according to
the uniform pattern followed.
Link to edit ownerContentId shows contentId in description rather than
ownerContentId in "ListLookupContent" form , updated that too.
Thanks: Florian Montalbano for report and Aditya Sharma for patch
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789665 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
transaction in place
(OFBIZ-9286)
While working on OFBIZ-8202 ("Use try-with-resources statement wherever it's
possible") I missed that you must begin the transaction before the
try-with-resources, this fixes it.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789045 13f79535-47bb-0310-9956-ffa450edef68
Removes a superfluous empty line (ProductSearchSession class)
Removes usless same embedded GenericEntityExceptionS in another
GenericEntityException (ShipmentServices class)
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1789044 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