633 Commits
Author SHA1 Message Date
Jacques Le Roux 1feb709998 Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Need to check for null before return
2021-11-19 10:06:35 +01:00
Jacques Le Roux 0ba7036f14 Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Manually handled issues after cherry pick
2021-11-19 10:04:02 +01:00
Jacques Le Roux 8f6a1d361e Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
In ternary operator post increment does not work, pre increment does

Thanks: Spotbugs
2021-11-19 09:34:34 +01:00
Jacques Le Roux 5866e2dbdf Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Char arrays can't use toString()

Thanks: Spotbugs :)

Conflicts handled by hand
EntitySaxReader.java
ControlServlet.java (no changes to do)
VisitHandler.java
2021-11-19 09:13:04 +01:00
Jacques Le Roux f5ded534e7 Fixed: Fix some bugs Spotbugs reports (OFBIZ-12386)
Fixes a Spotbugs worry and clarifies code

Conflicts handled by merging cherry pick as HEAD, so several no functional changes
2021-11-18 14:24:37 +01:00
Jacques Le Roux 7828ba64f2 Improved: Fix OFBiz specific Javascript security issues reported by GH CodeQL (OFBIZ-12366)
No functional change (imports order) to test CodeQL setting
2021-11-14 20:24:58 +01:00
Jacques Le Roux 76ea0d0486 Improved: Fix OFBiz specific Javascript security issues reported by GH CodeQL (OFBIZ-12366)
No functional change (imports order) to test CodeQL setting. Forgot that plugins
only don't activate actions
2021-11-14 19:16:42 +01:00
Jacques Le Roux 97fa32aa65 Improved: Fix OFBiz specific Javascript security issues reported by GH CodeQL (OFBIZ-12366)
Hopefully this is the right syntax to content
https://github.com/apache/ofbiz-framework/actions/runs/1459245431/workflow
though not on the line signaled. Let's see...
2021-11-14 18:26:02 +01:00
Jacques Le Roux 9293c2c057 Improved: Fix OFBiz specific Javascript security issues reported by GH CodeQL (OFBIZ-12366)
Add a line into fieldlookup.js just to make CodeQl happy
2021-11-14 17:23:52 +01:00
Jacques Le Roux 732f424d3c Improved: Fix OFBiz specific Javascript security issues reported by GH CodeQL (OFBIZ-12366)
I said
<<branches: [ trunk, release* ] is a better syntax because of more restriction
and will work too>>
because this syntax was initially generated by GH. Obviously something is wrong:
https://github.com/apache/ofbiz-framework/actions/runs/1459245431/workflow
Back to '**'
2021-11-14 17:17:44 +01:00
Jacques Le Roux 6d84e02c91 Improved: Fix OFBiz specific Javascript security issues reported by GH CodeQL (OFBIZ-12366)
branches: [ trunk, release* ] is a better syntax because of more restriction and
will work too
2021-11-14 17:05:34 +01:00
Jacques Le Roux 5fbd11e75e Improved: Fix OFBiz specific Javascript security issues reported by GH CodeQL (OFBIZ-12366)
Fixes OfbizUtil.js and fieldlookup.js by using dompurify

Also adds in .gitignore
/themes/common-theme/webapp/common/js/node_modules/
/docs/asciidoc/images/
as I have enough to see them when I switch between branches
2021-11-14 16:58:56 +01:00
Jacques Le Roux 5c414fc6a4 Improved: use more GH workflows to show badges in README.adoc
Among others, shows the release number, not yet CodeQL working
2021-11-14 15:49:53 +01:00
Jacques Le Roux 91357bbf0e Improved: modifies GH workflows to run on all branches
I followed this answer: https://github.com/github/codeql-action/issues/462
Too bad, it does not seem to work
https://github.com/apache/ofbiz-framework/actions/workflows/codeql-analysis.yml?query=branch%3Arelease18.12
(OK for trunk: https://github.com/apache/ofbiz-framework/actions/workflows/codeql-analysis.yml?query=)

I try the other syntax, ie '**'
2021-11-14 15:39:02 +01:00
Jacques Le Roux 26ac709078 Improved: modifies GH workflows to run on all branches
Will do the same later on trunk after checking it's OK here (where we don't use
npm to load js libs)
2021-11-14 15:21:37 +01:00
Jacques Le Roux 25e96ca05e Improved: Add same workflows than in trunk
This more a test, easy to revert in case of problems (I see none)
2021-11-14 14:52:31 +01:00
Wiebke Pätzold d6af7a1907 Fixed: Error while executing generateBlogRssFeed (OFBIZ-12363)
removes ServiceEventHandler.checkSecureParameter related to OFBIZ-11260

Thanks: Jacques Le Roux for report
2021-11-12 15:59:00 +01:00
Jacques Le Roux 982e2d43d2 Fixed: In LookupProduct some categories don't show, only blank lines (OFBIZ-12368)
For now only description is shown. OOTB some categories have no description
We can easily fix that by showing more info. I suggest to add categoryName and
productCategoryId. That should be enough. There are then no blank lines since
productCategoryId always show.

This is anyway customisable by users
2021-11-09 10:05:03 +01:00
Wiebke Pätzold a8f50c5759 Fixed: Builds fail due to unauthorized access to
repo.spring.io/plugins-release (OFBIZ-12351)

Replaces repository syndication by rometools

Thanks Mart Naum for report
2021-11-04 14:55:49 +01:00
Jacques Le Roux 7a78d4c837 Improved: Update build.gradle to the latest dependencies
(OFBIZ-11603)

Replaces deprecated calls

Conflicts handled by hand CrossSubdomainSessionValve.java
2021-10-26 08:02:00 +02:00
Jacques Le Roux 5ddb2b267f Fixed: DiskFileItem as request attribute creates problems (OFBIZ-12016)
With previous commit I removed UtilObject::getBytes but not
UtilObjectTests::testGetBytes_Stream which is related (see OFBIZ-11140)
2021-10-19 10:39:11 +02:00
Jacques Le Roux b21dff75d8 Fixed: DiskFileItem as request attribute creates problems (OFBIZ-12016)
This was related to reques-redirect usage with a file upload in the request.
More info at the Jira...

Thanks: Sebastian Berg and Benjamin Jugl for report
2021-10-19 07:07:01 +02:00
Jacques Le Roux e9f80ad021 Fixed: [SECURITY] CVE-2021-42340 Apache Tomcat DoS (OFBIZ-12337)
Upgrades to Apache Tomcat 9.0.54
2021-10-14 19:32:32 +02:00
Jacques Le Roux 5a1006e2d3 Improved: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
Prevents an useless inevitable warning by commenting out
RequestWrapper::getParameterNames and with it all the unused methods in
RequestWrapper class

Also better comments CacheFilter::doFilter by giving its real and only goal:
<<to prevent a post-auth security issue described in OFBIZ-12332>>
2021-10-11 09:44:14 +02:00
Jacques Le Roux c5aeab0fe9 Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
When I removed service-permission-tests, I forgot to remove associated
load-data-service-permission-tests :/
2021-10-10 17:27:48 +02:00
Jacques Le Roux 92c4c5dbfe Improved: Refactor methods signature to reduce the number of params they use (OFBIZ-12335)
Fixes a typo about filterConfiguration in CacheFilter.java
2021-10-10 13:35:53 +02:00
Jacques Le Roux abb3fe31c2 Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
Removes service-permission-tests accidentally added while handling conflicts by
hand
2021-10-10 13:24:23 +02:00
Jacques Le Roux 6872e2a695 Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
In previous commit, in CacheFilter::doFilter, I checked "xmlrpc"  when it was
actually "/control/xmlrpc"
2021-10-10 12:18:27 +02:00
Jacques Le Roux a1a24bd910 Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
This definitely solves all issues by introducing a CacheFilter and
RequestWrapper classes inspired by several works found on the Net.
Also moves the change introduced before in ContextFilter to CacheFilter.

The basic problem is that you only can use once
ServletRequest::getInputStream or the ServletRequest::getReader
Also not both, even once, ie they can be seen as same from this POV.

The integration tests all pass.

Also replace the checked String "</serializable>" by "</serializable" as, like
reported by Jie Zhu, the former could be bypassed by using "</serializable >"

Thanks: Jie Zhu for report

# Conflicts handled by hand
  CacheFilter.java
  RequestWrapper.java
2021-10-10 08:13:43 +02:00
Jacques Le Roux 25293e4cf6 Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
This definitely solves all issues by introducing a CacheFilter and
RequestWrapper classes inspired by several works found on the Net.
Also moves the change introduced before in ContextFilter to CacheFilter.

The basic problem is that you only can use once
ServletRequest::getInputStream or the ServletRequest::getReader
Also not both, even once, ie they can be seen as same from this POV.

The integration tests all pass.

Also replace the checked String "</serializable>" by "</serializable" as, like
reported by Jie Zhu, the former could be bypassed by using "</serializable >"

Thanks: Jie Zhu for report

Conflicts: ContextFilter.java handled by hand
2021-10-09 20:00:16 +02:00
Jacques Le Roux 02a544a820 Improved: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
Temporarily comments out XMLRPC tests.

I'll work on a definitive solution ASAP

Conflicts handled by hand: framework/service/testdef/servicetests.xml
2021-10-09 08:00:18 +02:00
Jacques Le Roux 0603293fa9 Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
Fixes the "eternal" (for R17 and R18 ;) bug about MODULE (trunk) vs module
2021-10-08 19:31:28 +02:00
Jacques Le Roux d6d863020c Fixed: post-auth Remote Code Execution Vulnerability (OFBIZ-12332)
As reported by Jie Zhu:
<<The latest version of the OFBiz framework (17.12.08) is affected by an
XMLRPC Remote Code Execution Vulnerability.
This vulnerability is caused by incomplete patch repair of cve-2020-9496.>>

Actually this is not an OFBiz bug (so not related to CVE-2020-9496)
but an old XMLRPC bug (Archiva was(/is?)) also affected:
https://nvd.nist.gov/vuln/detail/CVE-2016-5003

Unfortunately XMLRPC is no longer maintained, so it's OFBiz responsibility to
fix this bug.

As the code that secures serialisation in OFBiz is not reached by this bug, the
solution is to secure it at the ContextFilter class level (ie before it reaches
secured serialisation in OFBiz source).

Thanks: Jie Zhu for report and help.
2021-10-08 19:14:57 +02:00
Jacques Le Roux 2df240b589 Fixed: Edit record in product promotion, "Promotion Last Modified Date" is invalid, but don't notice to user (OFBIZ-12046)
As Lalit reported it's not really a bug. But an annoying service transformation
of updateProductPromo to entity-auto (I checked using R15.12). Note that
createProductPromo is not affected

I'm not sure other update services using entity-auto are not affected

Thanks: Do Nhu Vy for report, Lalit Dashora  for initial analysis
2021-10-02 13:58:16 +02:00
Nicolas Malin 59df842b83 Improved: Improve velocity of PartyHelper.getPartyName() with the cache
The class PartyHelper is massively used to resolve the name of a party without know is type.

     <field name="organizationPartyId" title="${uiLabelMap.ProductOrganization}">
         <display description="${groovy: org.apache.ofbiz.party.party.PartyHelper.getPartyName(delegator, organizationPartyId, true);} [${organizationPartyId}]"/>
     </field>

A party name have few change over time, or the PartyHelper.getPartyName function call the database at each call.

On huge screen, we distinctly clearly the database latency.

So for a cold data, no reason to didn't use the cache.
2021-09-29 21:49:05 +02:00
Nicolas Malin ffdf1b1da8 Fixed: Explode items not handling tax and adjustments properly (OFBIZ-11928)
If you set explodeItems to true on your productStore, tax and adjustment wasn't correctly calculate when you ordered some finish goods.

Thanks: Suraj Khurana and Ankush Upadhyay
2021-09-27 18:31:32 +02:00
Nicolas Malin 7cc848cfab Improved: Mandatory contact number when create/update a TelecumNumber (OFBIZ-11110)
It's possible that create a Telecum number without contactNumber that appears as an inconsistency.

Thanks: Rashi Dhagat for this issue
2021-09-27 16:57:43 +02:00
Nicolas Malin 48ecfade8e Fixed: Incorrect price for selected variant shown (OFBIZ-12236)
When the webshop (ecommerce component) has been set up for retail (B2C), with

    the tax setting 'Show prices with VAT tax included' set to 'Y' in store 9000
    the appropriat Tax Auth Geo and Tax Auth set in store 9000
    the flag 'Include Tax In Price' set to 'Y' for the Tax Auth
    the price for a virtual product is shown including VAT.

However, for a selected variant the price shown is without VAT

Thanks: Pierre Smits to raise the issue and Priya Sharma for solved it
2021-09-27 16:31:32 +02:00
Gil Portenseigne 523c25d0ba Improved: Create a deny list to reject webshell tokens (OFBIZ-12324)
Improve readability using stream api.
Fix deniedWebShellTokens property where some blank space where removed
and '// python' comment was inlined.
2021-09-23 10:49:30 +02:00
Jacques Le Roux 8b852ff612 Improved: Create a deny list to reject webshell tokens (OFBIZ-12324)
Extracts the list of words used in SecuredUpload::isValidText in a
deniedWebShellTokens property in security.properties
2021-09-20 18:14:50 +02:00
Jacques Le Roux 4da54af4e0 Fixed: Groovy Program sandbox bypass (OFBIZ-12305)
This much increases the current security by creating SecuredUpload::isValidText
and call it from ProgramExport.groovy

This said I agree with thiscodecc that a better solution would be to use a
Groovy sandbox, and not only in ProgramExport.groovy.

I had a quick glance at a such solution. Unfortunately as Cédric Champeau reports
at https://melix.github.io/blog/2015/03/sandboxing.html and unlike thiscodecc
suggest there are no "mature solutions on the market".

Nevertheless I'll have a deeper look at an OFBiz specific Groovy sandbox
solution.

Somehow related: I'll also soon extract the list of words used in
SecuredUpload::isValidText in a deniedWebShellWords property in security.properties

Thanks: thiscodecc for report

Conflicts handled by hand
  framework/webtools/groovyScripts/entity/ProgramExport.groovy
2021-09-17 18:52:01 +02:00
Nicolas Malin 16526428f2 Fixed: Groovy DSL failed to use 'run service' from an event call (OFBIZ-12322)
When you call a groovy script from an event controller, some information are present note on the same place on the binding context.

Example if you call a groovy script as service you found the userLogin with parameters.userLogin or when you call it as event, the userLogin is on the binding context root.

The problem appear with the DSL method 'run service' who search the missing value need by a service (userLogin, locale and timezone) on the map parameters on the binding context, so failed to populate correctly the information for an event.

Call from event
    Map serviceResult = run service: 'createInvoice', with: [partyId: partyId, invoiceDate: nowTimestamp]

Failed due to security issue : missing userLogin on the service context.
2021-09-17 15:05:19 +02:00
Jacques Le Roux 0216f21f82 Fixed: CVE-2021-37608 vulnerability bypass (OFBIZ-12307)
Fixes a number of issues I spotted while working on OFBIZ-12305 in relation with
OFBIZ-12055

The last change I made for OFBIZ-12305 was incomplete, the files could not be
checked by SecuredUpload because they did not exist! This concerns
ImageManagementServices, DataServices, FrameImage and ProductServices classes.
I used Files::createTempFile to fix that.

Also fixes a bug in SecuredUpload where I reversed the check on
fileToCheck.length in Windows case. I also added a comment, Windows 10 now
allows more length (need an OS parameter change though)

Finally, creates public SecuredUpload::isValidText to be used in OFBIZ-12305

Conflicts handled by hand
  DataServices.java
2021-09-17 11:41:37 +02:00
Jacques Le Roux 7f3e1f58c4 Fixed: Found a new XXE (XML External Entity Injection) vulnerability in EntityImport (OFBIZ-12304)
Fixes a typo issue
2021-09-13 09:56:03 +02:00
Jacques Le Roux d4297a1c29 Fixed: Found a new XXE (XML External Entity Injection) vulnerability in EntityImport (OFBIZ-12304)
The XXE vulnerability can read arbitrary files on the server.

Thanks: thiscodecc for reporting this security issue (post-auth)
2021-09-13 08:42:43 +02:00
Jacques Le Roux 9b5c721c2a Fixed: Found a new XXE (XML External Entity Injection) vulnerability in EntityImport (OFBIZ-12304)
The XXE vulnerability can read arbitrary files on the server.

Thanks: thiscodecc for reporting this security issue (post-auth)
2021-09-13 08:16:01 +02:00
Jacques Le Roux 24c72edc4c Fixed: Found a new XXE (XML External Entity Injection) vulnerability in ArtifactInfo (OFBIZ-12306)
The XXE vulnerability can read arbitrary files on the server.

Thanks: thiscodecc for reporting this security issue (post-auth)
2021-09-13 08:16:00 +02:00
Nicolas Malin 5a90821bd8 Fixed: Setup instructions don't work (OFBIZ-12228)
The creation of a new company failed with constraint database error due to a missing functional General Ledger data.

To correct this, we separate the demo GlAccount demo data from Accounting demo data to allow it alone when we create the new company.

A second error can appear with the presence of a partyAcctgPreference if the validation isn't realized immediately, so we just add a control of the presence before call service createPartyAcctgPreference.

Thanks to Szabolcs Szekelyi for raise this issue and Jacques Leroux for its look
2021-09-06 17:34:06 +02:00
Jacques Le Roux 4088e0a28e Fixed: CVE-2021-37608 vulnerability bypass (OFBIZ-12307)
Safer completing solution as recommended by weinull orz <weinull@outlook.com>
Previous commit was OK, but better be safe than sorry ;)

Also forgot to commit the DENIEDFILEEXTENSIONS checkstyle change last time

Thanks: weinull orz for the the right suggestion (done 2021-08-13)
2021-09-03 16:50:53 +02:00
Jacques Le Roux d0b4f2d164 Fixed: CVE-2021-37608 vulnerability bypass (OFBIZ-12307)
The fix I did is two folds:
filters extensions (thanks to Zhujie's suggestion of a list of extensions to ban)
deletes bad files at the right place (thanks to thiscodecc's report)

Thanks: thiscodecc for the security report
2021-09-03 13:48:05 +02:00
Jacques Le Roux 960cc0c1f1 Documented: Changes the link to issue tracker (Jira) to simplify things related to security 2021-09-01 09:55:28 +02:00
Jacques Le Roux 6e2c13a4eb Fixed: SecuredUpload::isValidTextFile wrong check with uppercase (OFBIZ-12301)
In SecuredUpload::isValidTextFile a wrong check is done

Thanks: Zhujie from Ping'an Technology
2021-08-10 13:03:39 +02:00
Jacques Le Roux 8fb8274144 Fixed: Wrong uploaded file checked in Image Management (OFBIZ-12297)
When I secured the uploads with OFBIZ-12080 I made a mistake and checked the
wrong uploaded file in Image Management.
2021-07-29 17:26:00 +02:00
Nicolas Malin 5944749ee0 Fixed: IndexOutOfBoundsException on Entity Import (OFBIZ-12273)
Backport e4919d16ca from trunk

Removes the localhost (and 127.0.0.1) OOTB.
Allows to use it through a "multi-property" (list) in security.properties.
2021-07-28 14:32:36 +02:00
Nicolas Malin 7a55ea8906 Fixed: UserLoginHistory failed the store operation with large password (OFBIZ-12287)
Backport 2aa68dc4de from trunk

When you have a user with long password (greater than 256 characters) present in OFBiz and you try to log with, OFBiz return a long error message with sensitive information due to exceeding value size to store on the field UserLoginHistory.passwordUsed.

To solve this we don't return any information on the genericValue that failed and analyze the field passwordUsed to escape the case where the password set to login is create than the database field capacity.

Thanks to Daniel Elkabes <daniel.elkabes@whitesourcesoftware.com> and Hagai Wechsler <hagai.wechsler@whitesourcesoftware.com> from white source software to raise the problem.
2021-07-28 14:31:59 +02:00
Jacques Le Roux 56df90751e Improved: Adds missing ASL2 headers in Rainbow Stone less files 2021-07-27 17:03:42 +02:00
dshunter107 5955df1924 Update services_ledger.xml (#315) 2021-07-27 14:02:41 +02:00
Jacques Le Roux e95c6a529c Fixed: bug on button from catalog to party associated (OFBIZ-12289)
Problem when trying to access Party linked to Catalog.
When you click on a user associated with a catalog, the framework sends you to
party manager, but it's the currently logged in user that shows up in the
party manager, not the party that you want to see.

To reproduce, just go in the Catalog app, then on Catalogs, add a user to a
catalog, and try to access it via the button.

It comes from the fact that the parameter sent to the party manager via the
link doesn't have the right syntax.

Thanks: Gaetan Chaboussie
2021-07-23 12:55:58 +02:00
Jacques Le Roux ace168d329 Fixed: Static initialization vectors for encryption (OFBIZ-12281)
(after discussing this on security@ofbiz.apache.org, it was decided to open a
Jira issue for that)

I've noticed that OFBiz Framework sometimes uses static initialization vectors
(IV) while creating a cipher:

https://s.apache.org/vhlbj
https://s.apache.org/nyndk

IVs should be unique and ideally unpredictable to avoid producing the same
ciphertexts for the same plaintexts.

The issues can be fixed with something like the following:

byte[] rawIV = new byte[8];
SecureRandom random = new SecureRandom();
random.nextBytes(rawIV).
IvParameterSpec iv = new IvParameterSpec(rawIV);

jleroux: this prepends the IV in order to decrypt the plaintexts. It's similar
to what has been done for the DesCrypt class. But contrary to the DesCrypt class
I did not test.

Thanks: Artem Smotrakov

Conflicts handled by hand (a lot)
ValueLinkApi.java
2021-07-23 09:29:07 +02:00
Jacques Le Roux bbc2d23f3a Fixed: Static initialization vectors for encryption (OFBIZ-12281)
(after discussing this on security@ofbiz.apache.org, it was decided to open a
Jira issue for that)

I've noticed that OFBiz Framework sometimes uses static initialization vectors
(IV) while creating a cipher:

https://s.apache.org/vhlbj
https://s.apache.org/nyndk

IVs should be unique and ideally unpredictable to avoid producing the same
ciphertexts for the same plaintexts.

The issues can be fixed with something like the following:

byte[] rawIV = new byte[8];
SecureRandom random = new SecureRandom();
random.nextBytes(rawIV).
IvParameterSpec iv = new IvParameterSpec(rawIV);

jleroux: we prepend the IV in order to decrypt the plaintexts. I'll do
something similar in ValueLinkApi class ASAP

Thanks: Artem Smotrakov

Conflicts handled by hand:
framework/base/src/main/java/org/apache/ofbiz/base/crypto/DesCrypt.java
2021-07-21 11:11:02 +02:00
Jacques Le Roux 8ec079fbfc Fixed: Add http to https redirect rule for ofbiz.apache.org (OFBIZ-10590)
This prevented to run the stable demo, hence the next
2021-07-20 07:38:34 +02:00
Jacques Le Roux fc96ffacca Fixed: Upgrades Tomcat from 9.0.43 to 9.0.48 (OFBIZ-12280)
Due to CVEs-2021-30037/30639/30640
2021-07-12 18:24:13 +02:00
Jacques Le Roux 2a7d12908b Fixed: Add TASK_STATUS to `status' field options in EditCalEvent form (OFBIZ-12271)
As WorkEffort entities with type as `Task' and a non-empty `Estimated Start Date'
will be included in calendar page, so TASK_STATUS should be added to EditCalEvent,
to make task status be correctly displayed and updated.

1. Go to page: https://demo-trunk.ofbiz.apache.org/workeffort/control/EditWorkEffort
2. Create a WorkEffort with Type as Task, Status as [Task] Accepted,
   and select Now for Estimated Start Date
3. Go to page: https://demo-trunk.ofbiz.apache.org/workeffort/control/calendar
4. Selected newly added task entry in calender, to show the edit form

In step 4, task status will be shown as In Planning, instead of Accepted.

Thanks: Xin Wang
2021-07-10 12:46:21 +02:00
Nicolas Malin 076c1e254c Fixed: Link request-confirmation not generated on menus (OFBIZ-12278)
Menus link with request-confirmation and confirmation message do not generate the script that open confirmation

When you activate the following menu item :
      <menu-item name="statusToCancelled" title="${uiLabelMap.AccountingPaymentTabStatusToCancelled}">
          <link target="setPaymentStatus" request-confirmation="true" confirmation-message="You want to cancel this payment number ${payment.paymentId}?">
              ....
         </link>
      </menu-item>

OFBiz to not generate the js code link to the request-confirmation attribute because this functionality has been never implemented on java code for MenuRenderer

Thanks to Leila Mekika for raised this issue and solved it
2021-07-09 21:12:31 +02:00
Gil Portenseigne 4e4d7144f7 Fixed: SeoConfigUtil does not maintain char-replace order (OFBIZ-12259)
Thanks: Ingo Wolfmayr for your contribution
2021-06-22 16:51:04 +02:00
Wiebke Pätzold 1f0797d5f3 Fixed: Adding tel protocol in CustomPermissivePolicy is not working
(OFBIZ-12258)

With these changes, the default sanitizers rules are only loaded if
there is no CustomPermissivePolicy
2021-06-22 12:03:27 +02:00
Jacques Le Roux 4cbc053a3f Fixed: Update PDFBox to 2.0.24 because of CVE-2021-31811 & CVE-2021-31812 (OFBIZ-12256)
CVE-2021-31811: A carefully crafted PDF file can trigger an OutOfMemory-Exception
while loading the file. This issue affects Apache PDFBox version 2.0.23 and prior 2.0.x versions.

CVE-2021-31812: a carefully crafted PDF file can trigger an infinite loop while
loading the file. This issue affects Apache PDFBox version 2.0.23 and prior 2.0.x versions.
2021-06-13 09:14:20 +02:00
Jacques Le Roux bb254caddd Fixed: Unexpected decoding of url encoded textarea data after submission (OFBIZ-12249)
When trying to add a note to WorkEffort entity, I found that URL encoded
characters are unescaped, which is not expected.

e.g.:
1. Go to page: https://demo-trunk.ofbiz.apache.org/workeffort/control/EditWorkEffortNotes?workEffortId=TASK01
2. Add a note with content: https://example.com/a%20link
3. After submission, it will turned to be: https://example.com/a link

Thanks: Xin Wang for report and exchanges until solution I provided

Conflicts:
  UtilHttp.java: removes unused OOTB checkURLforSpiders for simplification
  UtilValidate.java: replaces DEFAULT_EMPTY_OK simply by true
2021-06-09 12:27:13 +02:00
Jacques Le Roux 0c5fc36b59 Fixed: XSS vulnerability for ListWorkEfforts form (OFBIZ-12254)
If `sanitizer.enable` is turned off, `ListWorkEfforts` form will be vulnerable
to XSS attack, because of incomplete escaping.

Steps to reproduce:

1. Turn off `sanitizer.enable` in owasp.properties
2. Create a WorkEffort entity with name as `<script>alert(1)</script>`
3. Go to page: http://localhost:8080/workeffort/control/FindWorkEffort
4. Search for "Work Effort Name" which contains "script"

Thanks: Xin Wang
2021-06-09 11:00:39 +02:00
Jacques Le Roux bbb25daaf2 Fixed: Show WorkEffort names in FindWorkEffort page (OFBIZ-12253)
In FindWorkEffort page, "Work Effort Name" can be specified as search
option, but the result table do not show it.

It would be nice if WorkEffort names can be displayed. Actually,
'workEffortName' has already been added to the description of hyperlink
in 'workEffortId' field, but 'workEffortName' is not presented in
'fieldList', so names are failed to be shown.

Thanks: Xin Wang
2021-06-06 11:52:21 +02:00
Jacques Le Roux 664fd8f39c Fixed: Failed to update work effort child (OFBIZ-12250)
When trying to update child work effort, a SQL error is reported:
Column 'WORK_EFFORT_ID' cannot accept a NULL value.

Steps to reproduce:

1. Open : workeffort/control/ChildWorkEfforts?workEffortId=TASK01&trail=TASK01
2. Select a child work effort
3. Modify the name and click "Save"

related to OFBIZ-753, workEffortId is also duplicated in edit form, If I
comment out workEffortId field of EditWorkEffortAndAssoc, it works properly.

Thanks: Xin Wang for report and Scott for initial workaround in OFBIZ-753
2021-06-05 18:07:41 +02:00
Priya Sharma 40758718c9 [Fixed] Possibly currency display bug in 'Find Invoices' (OFBIZ-12177) (#302)
- Since the method InvoiceWorker.getInvoiceTotal takes care of the conversion, it is redundant to convert it again on the screen, which results in mismatch of the currency and the amount.

Thanks: Suraj, Jacques, Rajadurai for the review and Andrei Stan for reporting.
2021-05-31 18:51:14 +05:30
Jacques Le Roux ad58224614 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
Fixes the call to the Google API key

Thanks to Daniel
2021-05-30 06:33:24 +02:00
Jacques Le Roux 81654fc155 Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
Better way to handle a missing Google API key
2021-05-30 06:33:24 +02:00
Jacques Le Roux 7778b7692d Improved: Allow to pass a Google API key for geolocation (OFBIZ-12247)
This is related to this question from Daniel at
https://github.com/apache/ofbiz-framework/pull/220

I couldn't figure out how to configure OFBiz with my Google API key so ended up
temporarily patching
themes/common-theme/template/includes/GeoLocation.ftl line 44 with my key.
Line 44 looked similar to:
<script src="https://maps.googleapis.com/maps/api/js?key=secret_google_api_key" type="application/javascript"></script>

Is there a way to configure ofbiz with the API key?

Disclaimer: w/o a not free "Google API key" I was not able to test, will ask
Daniel...

Conflicts handled by hand
  framework/common/config/general.properties
2021-05-30 06:33:23 +02:00
Daniel Watford 847a400919 Fixed: Display rather than edit the From Date field of a Product Config Item Content when updating the content.
(OFBZ-12246)

When editing date-time fields, they are truncated to the second. However
the default From Date field value of a Product Config Item Content is
stored in milliseconds. The From Date is a primary key of the config
item content and is used when finding the relevant record to update.

When the From Date field was editable on the Edit Product Config Item
Content content form, it would be truncated to the second and included
in the update request POST to the server. Since the From Date was
altered, the relevant record to be updated could no longer be found by
its primary key.

By making the From Date field display only, we prevent truncation of its
value meaning the record to be updated can be found.
2021-05-28 10:29:14 +01:00
Daniel Watford 1e938f70ca Fixed: Typo in request parameter when editing Product Config Item
Content's content prevented retrieval of correct record.

(OFBIZ-12245)
2021-05-28 09:14:12 +01:00
wpaetzold 7badd17829 Implemented: Missing service for updateFacilityLocationGeoPoint (#296)
(OFBIZ-12242)

Thanks: Wiebke
2021-05-19 10:04:28 +02:00
Jacques Le Roux b8f9c029ce Fixed: Plugin not showing in menu due to permission (OFBIZ-12233)
When creating a plugin via gradle :
./gradlew createPlugin -PpluginId=plugin-test -PpluginResourceName=PluginTest
-PwebappName=plugin-test -PbasePermission=PLUGIN_TEST

and loading all the required data and permissions, the plugin doesn't appear
in the menu.

It comes from the ComponentConfig.java file, L1229, when the permissions gets
trimmed and modified. I tried removing it locally and it fixed the problem.

Thanks: Gaetan Chaboussie
2021-05-17 12:00:37 +02:00
Aditya Sharma b71208c4bb Reverted: unwanted changes (OFBIZ-10113) 2021-05-12 13:13:18 +05:30
Aditya Sharma 38b97e6ad3 Fixed: removed unused asmselect files and unused variable asm_asmListItemPercentOfForm (OFBIZ-10113)
asm select library is already replaced with select2 library, but the library files still exist in code base unused.
asm_asmListItemPercentOfForm varaible was used to set the width of the selected items which were displaced distictly from select fields. With select2, the selected items display inside the input field so it is no more needed

Thanks Jacques Le Roux for reporting it
2021-05-12 12:20:23 +05:30
Jacques Le Roux 9aa4e6c662 Fixed: Error page shown when clicking on a product Id in the purchase order page (OFBIZ-12229)
There is no "basePrice" resulting from calculatePurchasePrice service calling but
a simple "price".

This was put in with d04f777 commit and OFBIZ-11955

Thanks: Woyce Batkins for report
2021-05-01 19:10:01 +02:00
Jacques Le Roux 4d39ab2f1f Fixed: Order processing issue for dropship only products (OFBIZ-12068)
When a dropship only (or dropship on low ATP) product with no qualified supplier
added to shopping cart and cart converted to sales order. System should return
errors and should not create sales order.

Thanks: Amit Gadaley

Conflicts handled by hand
 ShoppingCart.java
and despite
 Auto-merging applications/order/src/main/java/org/apache/ofbiz/order/shoppingcart/CheckOutEvents.java
 CheckOutEvents.java too
2021-04-27 18:55:31 +02:00
Jacques Le Roux 9730842eac Fixed: Secure the uploads (OFBIZ-12080)
Reopened after report of a bug (only on *nix systems) by Shrilesh Korgaonkar.
This fixes the issue

Thanks: Shrilesh Korgaonkar
2021-04-16 09:24:27 +02:00
Jacques Le Roux aecefda2c6 Improved: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
The checksum part was missing in Windows init-gradle-wrapper.ps1 script
2021-04-11 10:19:21 +02:00
Jacques Le Roux a477b32439 Fixed: Service calls of "createPartyContactMech" now include the needed contactMechTypeId (OFBIZ-12175) (#292)
Accidentally removed PartyServices::createRoleType
2021-04-08 13:54:55 +02:00
wpaetzold 0344d93a26 Fixed: Error while deleting a Facility because of an existing (#291)
FacilityLocationGeoPoint (OFBIZ-12222)

Adds a service to delete a FacilityLocationGeoPoint
2021-04-08 11:52:50 +02:00
bjugl b196c58866 Fixed: Service calls of "createPartyContactMech" now include the needed contactMechTypeId (OFBIZ-12175) (#292)
This was broken by OFBIZ-8358 where, as well explained at OFBIZ-12175,
"createPartyContactMech Service has been changed to expect an OUT
contactMechTypeId paramter and the call on this end has not been modified."

jleroux: I fixed lines too long
File PartyServices.java
Error Description	Line
La ligne excède 150 caractères (trouvé 178).	2621
La ligne excède 150 caractères (trouvé 178).	2638
La ligne excède 150 caractères (trouvé 191).	2655

Conflicts handled by hand
2021-04-08 11:40:17 +02:00
bjugl 5193280424 Fixed: Service calls of "createPartyContactMech" now include the needed contactMechTypeId (OFBIZ-12175) (#292)
This was broken by OFBIZ-8358 where, as well explained at OFBIZ-12175,
"createPartyContactMech Service has been changed to expect an
OUT contactMechTypeId paramter and the call on this end has not been modified."

Conflicts handled by hand in PartyServices.java
I let the changes coming from trunk, too much to revert by hand
2021-04-08 11:18:28 +02:00
Jacques Le Roux 2c6f3068de Improved: Improve ObjectInputStream denyList (OFBIZ-12221)
In SafeObjectInputStream.properties
  Renames listOfSafeObjectsForInputStream to allowList and fixes it
  Introduces a denyList

Adapts SafeObjectInputStream class to new denyList

Conflicts handled by hand
  framework/base/config/SafeObjectInputStream.properties
  framework/base/src/main/java/org/apache/ofbiz/base/util/SafeObjectInputStream.java
2021-04-07 09:18:24 +02:00
Jacques Le Roux 544d207cbd Improved: Improve ObjectInputStream denyList (OFBIZ-12221)
Prevents generics markup in string type names.

Conflict handled by hand
  framework/base/src/main/java/org/apache/ofbiz/base/util/SafeObjectInputStream.java
2021-04-05 17:04:59 +02:00
Jacques Le Roux aece6851e3 Fixed: updates Tika because of CVE-2021-2865 2021-03-30 17:16:26 +02:00
Jacques Le Roux e5809580bb Documented: Comment out the SOAP and HTTP engines (OFBIZ-12212)
Documents that the EntitySync feature is no longer available OOTB.
You need first to re allow the HTTP engine
2021-03-30 13:05:25 +02:00
Jacques Le Roux 0f82c2679f Improved: Improve UtilObject class (OFBIZ-12216)
This removes the inoffensive but annoying message in log (which does not show in
trunk, see https://github.com/apache/ofbiz-framework/commit/27c9180/

Not the same as in trunk, simply handling with exception Rather than returning
null, also shorten java.rmi.server to java.rmi to block more cases
2021-03-30 12:38:19 +02:00
Aditya Sharma 7c1d9bfded Fixed: Form to add an employee position doesn't function properly when invoked from Humanres tree (OFBIZ-11684) (#289)
Replaced logic to ajaxify the response from EditEmplPosition with navigating user to EditEmplPosition page.
When we are getting the entire page and updating it into the DOM, it would be better if we navigate user to the page.
Issue with the current approach is current page and the EditEmplPosition page both have GlobalActions decorator all the js files in GlobalActions are loaded twice. Either we should ajaxify a section of page or we should navigate user to the EditEmplPosition page.

Thanks Pierre Smits for reporting the issue and Sebastian Berg, Michael Brohl, & Jacques Le Roux for the discussion and efforts
2021-03-30 10:58:00 +05:30
Jacques Le Roux c2d56b70ff Improved: Comment out the SOAP and HTTP engines (OFBIZ-12212)
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
2021-03-29 13:19:26 +02:00
Jacques Le Roux 87c03d4e06 Fixed: addImageForProduct fails (OFBIZ-12211)
The addImageForProduct  process is not directly uploading a file but renames it
before.So there is a hyphen, and possibly a pair or parenthesis in case of
duplicate files, added to the file name.

In this commit I have also added the possibility to use underscores and spaces
in the original filename
2021-03-29 11:08:42 +02:00
Jacques Le Roux 64468111a2 Fixed: Invalid Currency symbol in income statement csv export (OFBIZ-12108)
1. Navigate to URL: accounting/control/IncomeStatement?organizationPartyId=Company
2. In income statement section click on export as csv button.
3. The exported csv has correct balance but with invalid currency symbol.
4. On screen USD $ symbol is shown and in csv some other currency symbol is shown.

Thanks: Lalit Dashora for report, Praveen Sharma for the fix
2021-03-28 13:31:33 +02:00
Suraj Khurana bbab5e18b4 Fixed: ChangeReason was not being set on OrderStatus when orderItem was marked cancelled with reason.
(OFBIZ-12210)
Thanks Lalit Dashora for reporting the issue and providing the patch.
2021-03-27 16:23:02 +05:30
Jacques Le Roux a324669af0 Fixed: Secure the uploads (OFBIZ-12080)
Fixes an issue reported by 赖涵 <1044309102@qq.com>: "Any file upload and delete
in latest Apache OFBiz"

It was a simple syntax error on my side
2021-03-26 19:14:29 +01:00
Jacques Le Roux 221ae70557 Improved: Secure the uploads (OFBIZ-12080)
Improves the error message for the file name part
2021-03-24 19:16:14 +01:00
Wiebke Pätzold 583d30819f Improved: German translation for OrderShoppingList Labels (OFBIZ-12208) 2021-03-24 15:37:31 +01:00
Jacques Le Roux e2c8ca6c48 Improved: Update Freemaker to 2.3.31 in R17 and R18 (OFBIZ-12196)
That's for (low) security reason. There are no bugs in R17 and R18 but after
reading about FREEMARKER-124 at
https://freemarker.apache.org/docs/versions_2_3_30.html
I believe we should update update Freemaker to 2.3.31 in R17 and R18
2021-03-22 11:06:32 +01:00
Jacques Le Roux 49faf1e8f7 Improved: Add a framework method to get main webapp menu with the webapp name (OFBIZ-10601)
app-shortcut-screen="component://product/widget/catalog/CatalogScreens.xml#ShortcutApp"
was present in applications/product/ofbiz-component.xml
but not in ofbiz-component.xsd
2021-03-22 11:05:01 +01:00
Jacques Le Roux fc0f4e68c9 Fixed: Upgrade Apache PDFBox to 2.0.23 because of CVE-2021-27807 and CVE-2021-27906 (OFBIZ-12205)
Currently we don't declare any dependency on PDFBox. I guess because it's used
as a 3rd party by another lib. Fortunately it's easily done.
2021-03-21 16:35:41 +01:00
Jacques Le Roux 23fdafde13 Fixed: EditFinAccountReconciliations does not work (OFBIZ-12198)
Like for createGlReconciliation at OFBIZ-10675 it must be that this has never
been tested nor used by anybody. In relation with OFBIZ-10675, took me hours to
understand that it was only missing an INOUT instead of a simple IN :/
2021-03-18 10:23:07 +01:00
Jacques Le Roux 130f73ac9b Fixed: createGlReconciliation throws an error (OFBIZ-10675)
https://demo-trunk.ofbiz.apache.org/accounting/control/createGlReconciliation
When entering an amount and submitting the data an error is thrown.

jleroux:
EditFinAccountReconciliation form extends EditGlReconciliation. There
glReconciliationId and reconciledBalance fields are already present.
So adding them in EditFinAccountReconciliation  is wrong. On the other hand the
display of reconciledBalance is better in EditFinAccountReconciliation.
So I moved it there.

Thanks: Pierre Smits for report and Mohammed Rehan Khan for initial patch
2021-03-18 10:23:07 +01:00
Jacques Le Roux cc5d1a5f09 Fixed: createGlReconciliation throws an error (OFBIZ-10675)
See accounting/control/EditFinAccountReconciliations?finAccountId=ABN_CHECKING

Removes the unwanted condition to include duplicate reconciledBalance filed
which was the cause of the issue.

Thanks: Pierre Smits for report, Mohammed Rehan Khan for the fix
2021-03-18 10:23:06 +01:00
Pawan Verma e87e8f4418 Fixed: Bug preventing proper explosion of BOM containing virtual nodes (OFBIZ-12191)
Thanks: Nameet for report and fix and Jacopo for test.
2021-03-15 13:33:01 +05:30
Pawan Verma b2a59b12a9 Fixed: Error in deleting Financial Account (OFBIZ-12153)
1. Navigate to URL: accounting/control/FindFinAccount
2. Click on Find button. List of fin account will be displayed.
3. Click on delete button near available balance column.

Thanks: Lalit Dashora for report, Sourabh Jain for the initial fix, Jacques for the test.
2021-03-15 13:14:12 +05:30
Jacques Le Roux e0e9d0deee Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
Updates the documentation for Windows and Gradle wrapper download, needs
Powershell

Conflicts handled by hand
  README.adoc
2021-03-14 12:06:07 +01:00
Jacques Le Roux 1a70633c45 Fixed: Replace Bintray by a new place to upload the Gradle Wrapper (OFBIZ-12192)
Updates init-gradle-wrapper.bat
  to exit if Gradle wrapper already exists
  to start PowerShell (>=7) in admin mode, this to be able to use Set-ItemProperty

Updates init-gradle-wrapper.ps1
 to removes exit if Gradle wrapper already exists
 to create the gradle/wrapper dir if necessary
 to handle the ConstrainedLanguage mode if necessary

Conflicts handled by hand
  gradle/init-gradle-wrapper.ps1
2021-03-14 12:04:14 +01:00
Michael Brohl 94265fdb91 Fixed: Replace Bintray by a new place to upload the Gradle Wrapper
(OFBIZ-12192)

Changes script to use the proper Gradle wrapper version. Changes the
download url from Bintray to Gradle GitHub repository and removes the
backup link. Adjusts the sha checksums accordingly.

The Gradle download link pulls a gradle-wrapper.properties file which
references services.gradle.org/distributions/gradle-5.0-rc-5-bin.zip
instead of a 5.0.0 distribution. This was left this way for consistency.
2021-03-13 16:12:32 +01:00
Jacques Le Roux 742bc4650f Fixed: Use Labels in themes names (OFBIZ-9863)
Fixes wrong C/P done with r1865370
2021-03-12 11:20:18 +01:00
SebastianEcomify fabbba342c Fixed: Addressed log issues caused in FindGeneric.groovy (OFBIZ-12193) (#285)
The backportet Version of searchForm in FindGeneric.groovy was to
advanced for the 18.12 Version. The form was changed back to its
previous version and the changes causing the view Error in ViewEntities
have been worked into it
2021-03-12 11:01:44 +01:00
Jacques Le Roux 82c2258247 Fixed: webtools/control/threadList no longer works on trunk (only) (OFBIZ-12195)
It works if we downgrade Freemarker to 2.3.28 as in R18 and even using 2.3.29,
not 2.3.30.

Handles things at the Groovy level, ie put in context, rather than creating
in Freemarker template.

It's backported, even if it's not a pb but in trunk, because it's a (low)
security issue.
2021-03-12 08:59:08 +01:00
Jacques Le Roux d61fb40e56 Fixed: Cant search ViewEntity InventoryItemDetailForSum (OFBIZ-12193)
Go to Entity Engine - >
search entity InventoryItemDetailForSum (view entity) ->
search for entries -> an error message is shown.

A SQL exception occurred running the service executeFind

Thanks: Sebastian Berg

Conflicts handled by hand
 framework/webtools/groovyScripts/entity/FindGeneric.groovy
2021-03-08 10:09:45 +01:00
Jacques Le Roux a5d921efb8 Revert "Fixed: Error in deleting Financial Account (OFBIZ-12153)"
This reverts commit 04ec3b3e9e.
2021-03-05 06:18:33 +01:00
Jacques Le Roux 607d9edfd7 Fixed: When creating blog or forums, it failed to save (OFBIZ-10426)
Create a blog or forum and click save button, it will popup with error message.
The reason is because the mapKey passed from front end cannot be handled by the
service. The solution is not to pass the mapKey to the service.

Steps:

1) navigate to content/control/blogContent?blogContentId=BLOGROOTBIGAL

2) create a new article  content/control/EditBlogArticle?blogContentId=BLOGROOTBIGAL

Thanks: Jason Hao for report and Aman Mishra for the fix
2021-03-02 19:49:40 +01:00
Jacques Le Roux 14bcb82b6d Fixed: Upgrade Tomcat from 9.0.41 to 9.0.43 (OFBIZ-12165)
Fixes 2 security issues:

CVE-2021-25122 h2c request mix-up
Severity: Important

CVE-2021-25329 Incomplete fix for CVE-2020-9484 (RCE via session persistence)
Severity: Low
2021-03-01 23:15:06 +01:00
Jacques Le Roux 04ec3b3e9e Fixed: Error in deleting Financial Account (OFBIZ-12153)
1. Navigate to URL: accounting/control/FindFinAccount
2. Click on Find button. List of fin account will be displayed.
3. Click on delete button near available balance column.

Thanks: Lalit Dashora for report, Sourabh Jain for the fix
2021-03-01 14:32:50 +01:00
Jacques Le Roux 55ce2a3e7b Fixed: fixes testUpdatePartyCreditCard found by Buildbot
Changes all expireDate to 02/2100.
I'll not know if OFBiz will still be alive then, hope you will ;)

Conflicts handled by hand
 applications/datamodel/data/demo/AccountingDemoData.xml
2021-02-28 18:24:59 +01:00
Jacques Le Roux 4d97f22823 Fixed: Overlapped labels in Accounting transaction pdf export (OFBIZ-12110)
1. Navigate to URL: accounting/control/FindAcctgTrans
2. Click on search button and then click on export as pdf button
3. Validate the export pdf file, here labels are overlapped in pdf header.

Thanks: Lalit Dashora for report and enehlauri on GH with PR-281 for the fix
2021-02-28 11:34:00 +01:00
Michael Brohl d395d0f78f Improved: Corrects the log4j-jcl version to match the other log4j
libraries (OFBIZ-12171)
2021-02-27 14:43:38 +01:00
Michael Brohl 9a7d471e08 Fixed: Add missing dependency for the build (OFBIZ-12171) 2021-02-27 14:43:38 +01:00
Michael Brohl f53ea72d28 Improved: Switch from jCenter to mavenCentral to handle the jCenter
shutdown (OFBIZ-12171)
2021-02-27 14:43:38 +01:00
Michael Brohl 80a01d4fbd Fixed: Corrects wrong API use for Collections and Arrays
edu.emory.mathcs.backport.java.util.* instead of java.util.*
which was spotted during the jCenter to mavenCentral migration.
2021-02-27 14:43:38 +01:00
Jacques Le Roux aa4c6a8197 Improved: Enlarge the "more-app" menu in Rainbow Stome theme (OFBIZ-12181)
Enlarges #more-app in rainbowstone-main-theme.less from 40 to 200px
2021-02-26 10:24:36 +01:00
Jacques Le Roux 8a287a306a Fixed: Error while running MRP (OFBIZ-12187)
I tried running MRP for Sales Forecast option and it returned the following error.

Error running the initMrpEvents service: Service [initMrpEvents] target threw
an unexpected exception (java.sql.Timestamp cannot be cast to java.sql.Date)

Thanks: Nameet Jain

Conflict handled by hand
2021-02-23 13:01:42 +01:00
Jacques Le Roux 3566bd3ff8 Fixed: fixes wrong wiki URLs 2021-02-22 11:26:21 +01:00
Jacques Le Roux f2b04b5339 Fixed: Wrong heading on creating quote under order component (OFBIZ-11221)
Steps to re-generate :

1. Login with the username and password.
2. Go to order component order.
3. Click on Quotes
4. Click on new quotes

Error: Edit quote is shown on the place of New quote.
Actual: New quote should be shown on the place of edit quote on UI.

Thanks: jai kumar raghuwanshi for report, Pradyum Dharwa  for 1st patch,
Ratnesh Upadhyay for better suggestion and Ankit Joshi for the patch
2021-02-20 13:28:48 +01:00
Jacques Le Roux 16fb51c370 Fixed: Bypass Java GString to String conversion in ObjectType::simpleTypeOrObjectConvert (OFBIZ-12182)
Follows https://markmail.org/message/azn7e4g2rbpo7tvj

Conflicts handled by hand
 framework/base/src/main/java/org/apache/ofbiz/base/util/ObjectType.java
2021-02-19 09:38:09 +01:00
Deepak Dixit 4d689bdfb4 Fixed: Corrected property name as defined in general.properties
(OFBIZ-10008)
2021-02-17 12:49:30 +05:30
Wiebke Pätzold 98faab3001 Fixed: Financial account transaction (OFBIZ-10308)
Fixes the direction of some accounting transactions.

Thanks Ingo Wolfmayr for the patch
2021-02-15 19:49:13 +01:00
Michael Brohl 38e249bb36 Fixed: Cannot find symbol for variable RES_ERROR due to regression by
the backport for OFBIZ-10971.
2021-02-15 18:41:40 +01:00
Sebastian Berg f9fc00ad3b Fixed: Unable to add product (of ASSET_USAGE type) in order OFBIZ-10791
Thanks Priya for providing the patch
2021-02-15 18:06:20 +01:00
Jacques Le Roux be94f44da3 Fixed: webapp position does not really work (OFBIZ-12176)
Remove webtools from secondary menu to get it in right (12) position
2021-02-15 13:57:52 +01:00
Jacques Le Roux f0b9741347 Improved: Default ordering of webapps titles in main menu (OFBIZ-12166)
[...] having more important apps in 1st places would be better [...]
the feature should be easily changed by custom projects [...]
documentation for that would be enough.

This 1st step sorts the applications and webtools. I believe webtools should not
be secondary but that needs to be discussed with other options.

Conflicts handled by hand applications/product/ofbiz-component.xml
2021-02-15 12:26:14 +01:00
Jacques Le Roux a929846ea2 Fixed: issue put in with r1160964 (9 years, 5 months ago)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:08:02 +01:00
Jacques Le Roux af7e50973b Fixed: Use from-field pattern instead of value=${***} pattern in 'set' element (OFBIZ-9607)
Fixes a syntax issue spotted while testing FreeMarker 2.3.31
2021-02-13 18:08:02 +01:00
Jacques Le Roux 1ed018c677 Fixed: Remove _PREVIOUS_REQUEST_ Session Attribute on non-authentication pages (OFBIZ-12047)
After some small study, it seem there is a problem because login request not
require authentication

I have tried to add a test to check if current request is login and only if it's
not to remove PREVIOUS_REQUEST Session Attribute, it seem better with this
modification.

Thanks: Olivier for the patch and Michael for suggesting to parameterize using
a property. I simply used EntityUtilProperties.getPropertyValue instead of
UtilProperties.getPropertyValue

Conflicts: handled by hand
 framework/security/config/security.properties
2021-02-13 12:31:52 +01:00
Deepak Dixit 6616a0208e Fixed: Incorrect mapping for Lookup Purchase Order (#273)
(OFBIZ-12143)

This issue was due to common form is being used for LookupPurchaseOrderHeaderAndShipInfo and LookupOrderHeaderAndShipInfo screen. Passed the paginateTargetUrl from screen to make sure pagination works properly
Thanks Rajesh Kumar for reporting the issue
2021-02-12 16:16:07 +05:30
Suraj Khurana e1f3cd92c3 Fixed: ViewQuoteProfit shows fields in wrong order.
(OFBIZ-11680)
Thanks Pierre for reporting and Lalit Dashora for providing the patch.
2021-02-12 11:06:12 +05:30
Benjamin Jugl 85150bc7ab Fixed: Prevents NPE in Party/My Communications (OFBIZ-12164) 2021-02-11 21:38:16 +01:00
Michael Brohl 177b96300f Improved: Replaces ModelInduceFromDb with widgets (OFBIZ-6510)
This is a manual backport of the related two commits in trunk with minor
changes to fit the r18.12 codebase.
2021-02-11 21:12:26 +01:00
Jacques Le Roux ee51eb7360 Fixed: Adds a blacklist (to be renamed soon to denylist) in Java serialisation (OFBIZ-12167)
Adds an example based on RMI which is known to be a problem
2021-02-05 11:03:26 +01:00
Ingo Könemann 03167586f9 Fixed: Remove _PREVIOUS_REQUEST_ Session Attribute on non-authentication
pages (OFBIZ-12047)

Added removal of the _PREVIOUS_REQUEST_ attribute when requesting
non-authenticated sites and moved targetRequestUri handling to a
accommodate this change
2021-02-03 11:50:55 +01:00
Benjamin Jugl b56ff5f659 Fixed: StringOutOfBounds Exception while checking available Languages
(OFBIZ-10707)
2021-02-03 11:25:20 +01:00
Michael Brohl c7f4a27f66 Fixed: Possible NPE in DatabaseUtil.getColumnInfo(...) (OFBIZ-11385)
Manually backported to 18.12 because of code differences.
2021-02-01 17:43:19 +01:00
Wiebke Pätzold b19c0d3173 Improved: Spelling error in the German translation of Slovakia
(OFBIZ-12161)
2021-01-28 18:16:17 +01:00
Daniel Watford a6ffc0087c Fixed: Use data url scheme for logo in CompanyHeader
(OFBIZ-7327)

Use a data URL rather than a regular URL for company logos when a
logo has been specified as a Party Content item. This works around the
problem of Apache FOP failing to retrieve content from HTTPS URLs.

Thanks: Deepak Dixit for the review and suggestions
2021-01-24 17:05:59 +00:00
Jacques Le Roux a5fdd7b063 Fixed: Ampersand in Party not displayed correctly (OFBIZ-12140)
In the reported case, ModelFormField::getDescription double HTML encodes the
description when both the entity and the description contain an ampersand.

A solution is to test if the description is already HTML encoded before encoding
it again. If HTML encoded then only String encodes it.

BTW I'm not sure it's useful but it's harmless, the same solution can be applied
to OFBIZ-12026 and similarly in renderableFtlFormElementsBuilder::encode. I'll
do as improvements...

Thanks: Andrew Waters for report and help in analysis
2021-01-23 17:49:35 +01:00
Jacques Le Roux b7ee7fc397 Fixed: Creating a new Customer create a wrong record in CommunicationEvent (OFBIZ-12142)
In https://markmail.org/message/pf3d3qyjfucicbj7 I initially answered:
In demo data 13 parties use <<infoString="ofbiztest@example.com">> as in
<ContactMech contactMechId="FRA01" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
This one is loaded last. Rather
<ContactMech contactMechId="Company" contactMechTypeId="EMAIL_ADDRESS" infoString="ofbiztest@example.com"/>
which is the 1st one, should be loaded last.

A better solution is to use "ofbizsupport@example.com" in EmailServices.xml

Indeed, fortunately the Company party also uses this infoString and using it in
EmailServices.xml does not affect the integration test and should not affect
other parts of the (only) demo data

Thanks: Emad Radwan for opiniated report :) and Pritam Kute for issue analysis
2021-01-18 20:13:32 +01:00
Deepak Dixit b40c3d0c78 Fixed: Corrected the tika-parsers dependency version, also remove redundant entry for tika-core. This should fix the build failure (OFBIZ-12100)
Thanks Alexander Tzvetanov for reporting the issue
Manually backported fix from commit#24d9328cdf6489ba0e4c2d9b849f08c66658a5e2
2020-12-31 16:05:48 +05:30
Jacques Le Roux 80740645a6 Fixed: partymgr fails to upload image (OFBIZ-12101)
This is a bug due to OFBIZ-12080, fileToCheck is the complete name of the file
with path not the filename

Thanks: Wai for report
2020-12-26 09:07:38 +01:00
Jacques Le Roux bd4a0f3592 Improved: Remove hardcoded product category on CategoryWorker.getCatalogTopCategory (OFBIZ-12078)
When you call the java function
org.apache.ofbiz.product.category.CategoryWorker.getCatalogTopCategory()
the catalog returned if the system failed found it is hardcoded and don't use an
existing property : catalog->top.category.default

Thanks: Nicolas

Conflicts handled by hand:
applications/product/src/main/java/org/apache/ofbiz/product/category/CategoryWorker.java
2020-12-25 17:04:25 +01:00
Jacques Le Roux 5860dbe3cc Fixed: Unique form names for promo actions (OFBIZ-12082)
Creating a promo with multiple rules and actions results in an exception.

It's reproducible by creating a promo with 1 rule and more than 1 Action and
specifying different products for each Action. When creating the second Action
and trying to specify another product to included the ajax request LookupProduct
will fail because it included both product ids in its xhr request.

Thanks: Danny Trunk
2020-12-25 16:18:14 +01:00
Jacques Le Roux c91c4f856d Fixed: Issue in creating promotion action (OFBIZ-11168)
The issue reported there was fixed with OFBIZ-11058.

But there was still an issue in logI reported in a comment.

The problem was that
<#assign productPromoActionCurEnum = productPromoAction.getRelatedOne("ActionEnumeration", true)>
was used in 2 places where it should not have been because it returned a null
value that can't be handled by OFBiz.

Better use
<#assign productPromoActionCustomMethod = productPromoAction.getRelatedOne("CustomMethod", true)>
and
productPromoAction.getRelatedOne("ActionEnumeration", true))??

The repercussion was that the description was not used but the Id and the log
was showing an error.
2020-12-25 16:10:34 +01:00
Jacques Le Roux 8bdf4d447e Fixed: Make ruleName field in PriceForms.xml#AddPriceRules safe (OFBIZ-12098)
I noticed an issue due to entity-auto. Unlike with a standard service you can't
protect fields using allow-html="safe" except by overriding fields. So in case
this must be done one by one...

An example is ruleName field in PriceForms.xml#AddPriceRules with
createProductPriceRule and updateProductPriceRule services

This fixes this only case...
Also removes trailing blanks and only that (by IDE setting)
2020-12-20 11:14:23 +01:00
Jacques Le Roux 4e400fb47a Fixed: Make ruleName field in PriceForms.xml#AddPriceRules safe (OFBIZ-12098)
I noticed an issue due to entity-auto. Unlike with a standard service you can't
protect fields using allow-html="safe" except by overriding fields. So in case
this must be done one by one...

An example is ruleName field in PriceForms.xml#AddPriceRules with
createProductPriceRule and updateProductPriceRule services

This fixes this only case...
Also removes trailing blanks and only that (by IDE setting)
2020-12-20 11:04:23 +01:00
Jacques Le Roux 42571fb635 Fixed: Post-auth XSS vulnerability at catalog/control/EditProductPromo (OFBIZ-12096)
Prevents issues with integration tests

Conflicts handled by hand:
framework/base/src/main/java/org/apache/ofbiz/base/util/UtilCodec.java
2020-12-19 20:44:45 +01:00
Jacques Le Roux d620550a5f Fixed: Post-auth XSS vulnerability at catalog/control/EditProductPromo (OFBIZ-12096)
We missed to unescape EcmaScript encoded strings in
UtilCoded::checkStringForHtmlSafe, ie in all form fields using allow-html="safe"

Thanks: 牛治 <niu.zhi@zte.com.cn> for report

Conflicts handled by hand => no functional changes in code (ude to IDE setting)
framework/base/src/main/java/org/apache/ofbiz/base/util/UtilCodec.java
2020-12-19 18:20:14 +01:00
Jacques Le Roux e3c274128b Fixed: Secure the uploads (OFBIZ-12080)
According to https://s.apache.org/rpzog, adds few, maybe redundant, Java
API/methods found in webshell, or alike, source code
2020-12-14 19:01:06 +01:00
Jacques Le Roux 16ffa216d9 Fixed: Secure the uploads (OFBIZ-12080)
Follows OWASP advice on file names:

All the control characters and Unicode ones should be removed from the filenames
and their extensions without any exception. Also, the special characters such as
“;”, “:”, “>”, “<”, “/” ,”\”, additional “.”, “*”, “%”, “$”, and so on should be
discarded as well.

If it is applicable and there is no need to have Unicode characters, it is
highly recommended to only accept Alpha-Numeric characters and only 1 dot as an
input for the file name and the extension; in which the file name and also the
extension should not be empty at all
(regular expression: [a-zA-Z0-9]{1,200}.[a-zA-Z0-9]{1,10}).

So if someone needs other chars in uploaded filenames a change will be needed
2020-12-14 16:51:32 +01:00
Jacques Le Roux b159dffb15 Fixed: Secure the uploads (OFBIZ-12080)
Prevents too long filenames as recommended by OWASP.

Based on https://security.stackexchange.com/questions/46484/denial-of-service-when-uploading-a-file#answer-46495
I decided to not limit sizes of files. Anyway we know it's only post-auth...
2020-12-14 12:48:06 +01:00
Jacques Le Roux 36464a5b84 Improved: Gradle logging hygiene (OFBIZ-12085)
Some times ago, we were forced to stop and quickly restart the demos because of
the Gradle daemons logging taking all the place; though we don't use Gradle
daemons in demos. Weird isn't ?

The reason is that by default org.gradle.logging.level=lifecycle is verbose.
Anyway, all org.gradle.logging.level are verbose. I mean they also duplicate
OFBiz information, have a look into your own Gradle daemon dir!

And that even if you don't use daemons, as we do for demos. Because Gradle
always uses at least 1 daemon to run.

So I was looking for a solution to not uselessly clutter the VM disk demos and
stumbled upon <<Gradle logging hygiene - Issue #2688>> - gradle/gradle (github.com)

This uses Evgeny Naumenko's solution at
https://discuss.gradle.org/t/gradle-daemon-produces-a-lot-of-logs/9905

I backport because it's needed by demos

# Conflicts:
#	build.gradle
2020-12-11 18:00:17 +01:00
Jacques Le Roux 2c4824f9fa Fixed: Hyperlink title under form widget doesn't support character encoding for special characters (OFBIZ-12026)
When we use any title with special characters for hyperlink tag, it shows broken
string on UI, eg:
<hyperlink description="${uiLabelMap.CommonImportExport}"  target="ImportExport">
should render a button with the title "Import/Export. But it shows as
Import&#x2f;Export

jleroux: I have noticed that the same happens with special French characters.
So it's a general issue.
The title (description in code) is HTML encoded and that does not work for
special characters. I simply used a string encoder.

Thanks: Pradeep Choudhary for report, Sourabh Jain for a possible but not
general solution at OFBIZ-12023, ie using target-type="plain"
2020-12-11 13:42:51 +01:00
Jacques Le Roux c95a6dbe8d Improved: Adds the HTML <input> accept Attribute in form widgets and Freemaker templates (OFBIZ-12049)
As explained at
https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept
this is only an help for the users (ie not a security feature), but an
appreciable one easy to implement.

Here we start with website/WebSiteCMSContent.ftl
Also add some missing file extensions
2020-12-08 09:42:03 +01:00
Jacques Le Roux b57c563e89 Fixed: Secure the uploads (OFBIZ-12080)
module should be MODULE in SecuredUpload class

Improves: add adio adn video to supported file formats in security.properties
2020-12-07 19:43:57 +01:00
Jacques Le Roux b25776d131 Fixed: Label issue on List Companies page (OFBIZ-12023)
Navigate to URL: 'accounting/control/ListCompanies'
Under the companies list, the 2nd column has button for account
The System is not showing proper label in French.

This issue is occurring due to the hyperlink title is not supporting character
encoding for special characters. Please track progress under OFBIZ-12026.
2020-12-07 18:32:46 +01:00
Jacques Le Roux 80709b7da9 Fixed: Secure the uploads (OFBIZ-12080)
Handles audio and video formats supported by Tika.

Adds few new audio and video formats in seed data.

AFAIK there are no ways to embed a webshell in an audio or video file. So I did
not sophisticate the validation, just rely on Tika.

I have also fixed bugs in SecuredUpload: in isValidSvgFile and
isValidImageIncludingSvgFile
2020-12-07 15:10:43 +01:00
Jacques Le Roux 1b9784dcdf Fixed: Secure the uploads (OFBIZ-12080)
Improves the labels names and format comment in LayoutEvents.java

I backport to ease later works...
2020-12-06 11:17:46 +01:00
Jacques Le Roux dbaf5049cf Fixed: Secure the uploads (OFBIZ-12080)
Replaces RESOURCE by resource, doh!
2020-12-06 11:09:53 +01:00
Jacques Le Roux 03e17a0f82 Fixed: Secure the uploads (OFBIZ-12080)
validateUploadedFile() fixes another case reported in August by Harshit

Conflicts handled by hand
applications/content/src/main/java/org/apache/ofbiz/content/ContentManagementServices.java
2020-12-06 10:19:26 +01:00
Jacques Le Roux 9b01c8571d Fixed: Secure the uploads (OFBIZ-12080)
org.apache.xmlgraphics:batik:1.13 does not include batik-svg-dom it's in
batik:batik-svg-dom:1.6-1.

It's also in org.eclipse.birt.runtime:viewservlets:4.5.0 that's why it worked
only with plugins
2020-12-02 10:03:35 +01:00
Jacques Le Roux 8b511e3c0b Fixed: Secure the uploads (OFBIZ-12080)
2020/08/10 the OFBiz security team received a security report by Harshit Shukla
<harshit.shukz@gmail.com>, roughly it was (quoting part of it to simplify):

<<I have identified a Remote Code Execution (RCE) Vulnerability. The reason
behind this RCE is lack of file extension check at
catalog/control/UploadCategoryImage?productCategoryId=CATALOG1_BEST_SELL&pload_file_type=category>>

Using this post-auth RCE in OFBiz demos, Harshit was able to get some AWS
credentials by uploading a webshell (based on [0]).
By security, it was then decided by the Infra and OFBiz security teams to shut
down the demos.

After discussing the elements reported with Mark J Cox (VP of ASF security team)
we in common decided that no CVE was necessary.

# Conflicts handled by hand:
#	applications/content/src/main/java/org/apache/ofbiz/content/data/DataResourceWorker.java
#	applications/content/src/main/java/org/apache/ofbiz/content/data/DataServices.java
#	applications/product/groovyScripts/catalog/category/EditCategory.groovy
#	applications/product/groovyScripts/catalog/config/EditProductConfigItemContent.groovy
#	applications/product/groovyScripts/catalog/imagemanagement/ImageUpload.groovy
#	applications/product/groovyScripts/catalog/imagemanagement/SetDefaultImage.groovy
#	applications/product/groovyScripts/catalog/product/EditProductContent.groovy
#	applications/product/src/main/java/org/apache/ofbiz/product/image/ScaleImage.java
#	applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/FrameImage.java
#	applications/product/src/main/java/org/apache/ofbiz/product/imagemanagement/ImageManagementServices.java
#	applications/product/src/main/java/org/apache/ofbiz/product/product/ProductServices.java
#	build.gradle
#	framework/base/src/main/java/org/apache/ofbiz/base/util/FileUtil.java
#	framework/base/src/main/java/org/apache/ofbiz/base/util/HttpRequestFileUpload.java
#	framework/base/src/main/java/org/apache/ofbiz/base/util/template/FreeMarkerWorker.java
#	framework/security/config/security.properties
2020-12-01 10:27:22 +01:00
Girish Vasmatkar 2f14eb6472 Fixed: Discouraged use of variable to store command with paramaters because of wordsplitting issue
and instead used complete command for wget .(OFBIZ-12066)
2020-11-30 16:37:47 +05:30
Jacques Le Roux 9f4038f4d5 Fixed: Label issue on List Companies page (OFBIZ-12023)
Navigate to URL: 'accounting/control/ListCompanies'
Under the companies list, the last column has button for import export.
The System is not showing proper label.

This issue is occurring due to the hyperlink title is not supporting character
encoding for special characters. Please track progress under OFBIZ-12026.

Thanks: Lalit Dashora for report, sourabh jain for patch, Daniel Watford for test
2020-11-30 12:01:00 +01:00
Saurabh Dixit 4d1000c587 Fixed: Single product tile is displayed on one row in product search. (OFBIZ-12045) (#245)
Cause: Wrong use of bootstrap grid classes.
Fix: Used row class as a parent to col-* class while rendering the products.
2020-11-30 11:40:15 +01:00
Nicolas Malin 310764f82a Fixed: Create a blog article failed to link each contents
(OFBIZ-12075)

When you create a blog article with screen https://localhost:8443/content/control/EditBlogArticle?blogContentId=${blogId} by default you can create an article with a summary, an image and a long text.

After the creation all content related to this article was created by impossible to display this article correctly. The problem come from the contentAssoc of each relation where the mapKey isn't populate.

The root come from the conversion to entity-auto for the service createContent, where some seca are present and use some field to create some relation with attribute not present on a content (like the field mapKey)

To correct this I the simple way is to authorize these fields, and think for the future how do better.
2020-11-30 09:19:48 +01:00
Jacques Le Roux aa082789b5 Fixed: Edit button(s) are shown for shipments received or shipped (OFBIZ-11788)
When a shipment has been received (purchase) or shipped (sales), the shipment
process should be concluded. And thus the shipment should not be editable anymore.

Thanks: Pierre Smits for report, Ankit Joshi for patch
2020-11-29 20:41:58 +01:00
Deepak Dixit 27d406cd19 Improved: Update IND Geo data as per 2020-11-24 notification (#242)
- Deletion of Union territory IN-DD, IN-DN;
- Addition of Union territory IN-DH;
- Correction of spelling for IN-AR, IN-BR, IN-CH, IN-CT, IN-DH, IN-GJ, IN-HP, IN-HR, IN-JH, IN-JK, IN-KA, IN-LA, IN-MH, IN-ML, IN-NL, IN-RJ, IN-TG, IN-TN, IN-UT;
2020-11-28 12:39:45 +05:30
Jacques Le Roux bb4c815dfc Reverted: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
This reverts commit 1be480b68c.

Actually the problem was due to another WIP where 2 streams were not closed
2020-11-27 11:54:00 +01:00
Jacques Le Roux 3201b163c8 Reverted: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
This reverts commit 2c86f9a8c0.

Actually the problem was due to another WIP where 2 streams were not closed
2020-11-27 11:51:04 +01:00
Jacques Le Roux 41faac6a3c Fixed: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
On Windows in EditProductContent.groovy neither file.renameTo(), Files.move()
nor FileUtils.moveFile works. Copy and delete works.
2020-11-27 10:22:10 +01:00
Jacques Le Roux bd15c64980 Fixed: Replace java.io.File::renameTo by java.nio.file.Files::move (OFBIZ-12063)
This is a bug because the behaviour is not assured on Windows for instance. So
it's impossible to correctly develop and test.

As explained at
https://docs.oracle.com/javase/8/docs/api/java/io/File.html#renameTo-java.io.File-

<<Many aspects of the behavior of this method are inherently platform-dependent:
The rename operation might not be able to move a file from one filesystem to
another, it might not be atomic, and it might not succeed if a file with the
destination abstract pathname already exists. The return value should always be
checked to make sure that the rename operation was successful.
Note that the Files class defines the move method to move or rename a file in a
platform independent manner.>>

So the expression
  file.renameTo(file1)
used in 5 Application Product Groovy scripts can be easily replaced by
  Path source = file.toPath()
  Files.move(source, source.resolveSibling(filenameToUse))
that is working on all platforms as explained at
https://docs.oracle.com/javase/8/docs/api/java/nio/file/Files.html#
move-java.nio.file.Path-java.nio.file.Path-java.nio.file.CopyOption...-
2020-11-24 18:40:08 +01:00
Jacques Le Roux b0827afd97 Fixed: .sh missing in <<Unix-like OS: ./gradle/init-gradle-wrapper>>
My bad :/

Thanks: Tuck Seng Phoon
2020-11-20 17:37:48 +01:00
Jacques Le Roux 792f45773f Fixed: Prevent arbitary file write using webtools/control/EntitySQLProcessor. (OFBIZ-12057)
Shuibo Ye <shuiboye@gmail.com> reported a possible arbitary file write using
webtools/control/EntitySQLProcessor.

    In the "SQL Command" part, I create a table and insert some strings and
    export the table to a file one sentence at a time.
    PoC: CREATE TABLE "test" (string VARCHAR(80))
    INSERT INTO "test" (string) VALUES ('<%= system.getProperty("user.dir") %>')
    call SYSCS_UTIL.SYSCS_EXPORT_TABLE(null,'test','.\framework\webtools\webapp\webtools\default.jsp',null,'*',null)

    After executing the three sentences,I successfully write the file and its url
    is https://localhost:8443/webtools/default.jsp.

I fixed it preventing execution on SYSCS_UTIL.SYSCS_EXPORT_TABLE and JSP, more
could be added if necessary
2020-11-16 14:08:53 +01:00
Jacques Le Roux 0b26b9155f Improved: Prevent possible post-auth RCE from webtools/control/ProgramExport (OFBIZ-12055)
This was reported to the security team by Shuibo Ye <shuiboye@gmail.com>.
We did not create a CVE because it's a post-auth "vulnerability"

Thanks: Shuibo Ye
2020-11-14 11:56:52 +01:00
Jacques Le Roux 01c0ff5469 Fixed: Prevent Zip Slip vulnerability (OFBIZ-12056)
While working with FileUtil::unzipFileToFolder I noticed that it's vulnerable to
Zip slip vulnerability: https://snyk.io/research/zip-slip-vulnerability.

Fortunately OOTB code does not use FileUtil::unzipFileToFolder so I did not
create a CVE, nor reported to
https://github.com/snyk/zip-slip-vulnerability#user-content-projects-affected-and-fixed.
If you think we should please shime in...
2020-11-14 11:43:38 +01:00
Jacques Le Roux 0dc68b346a Fixed: Handle special characters like single quote in Freemarker template (prevent encoding) (OFBIZ-12029)
A such case was reported by Amit Gadaley at
https://markmail.org/message/ybyjkngdiwrywut6
The solution is to use StringUtil.wrapString() to prevent encoding.
2020-11-10 11:10:33 +01:00
Jacques Le Roux 35f6009d19 Improved:
Fixes a warning:
PartyServices.java:1700: warning: [unchecked] unchecked conversion
List<String> partyClassificationGroupIds = (List) context.get("partyClassificationGroupId");
^
2020-11-06 11:36:05 +01:00
Jacques Le Roux b420b0ea5d Fixed: NotSerializableException using uploadPartyContentFile service (OFBIZ-12050)
Removes a warning:

UtilMisc.java:202: warning: [rawtypes] found raw type: Iterator
Iterator itr = arrayList.iterator();
^
missing type arguments for generic class Iterator<E>
where E is a type-variable:
E extends Object declared in interface Iterator
2020-11-06 11:30:53 +01:00
Jacques Le Roux af464dfa70 Fixed: NotSerializableException using uploadPartyContentFile service (OFBIZ-12050)
This error appears after trying to upload a file to party content:

2020-11-06 07:48:22,488 |jsse-nio-8443-exec-7 |RequestHandler                |I|
Sending redirect to:
[https://localhost:8443/partymgr/control/viewprofile?partyId=admin].
2020-11-06 07:48:29,288 |jsse-nio-8443-exec-7 |UtilObject                    |E|
null
java.io.NotSerializableException: org.apache.commons.fileupload.disk.DiskFileItem

# Conflicts handled by hand
#	framework/base/src/main/java/org/apache/ofbiz/base/util/UtilMisc.java
#	framework/webapp/src/main/java/org/apache/ofbiz/webapp/control/RequestHandler.java
2020-11-06 11:07:19 +01:00
Jacques Le Roux 9cfd5a73e1 Fixed: Sorting of lists generates undesired results (OFBIZ-8302)
For this issue (OFBIZ-8302) I reverted the point 1 of
http://svn.apache.org/viewvc?view=revision&revision=1759555

As reported by Alvaro Munoz from GH security team it's not sufficient:
<<the second part of the fix was not effective, since the attacker can close the
raw string context with a double quote and write a new attribute or even close
the macro tag and write arbitrary FreeMarker code.>>

So this removes the 2nd part and add better solution to fix the OFBIZ-8302 issue
The solution is to encode only the QueryString and to handle it correctly in
UtilHttp::getParameterMap. I must say it was not a sinecure!

# Conflicts:
#	framework/base/src/main/java/org/apache/ofbiz/base/util/UtilHttp.java
#	framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/macro/MacroFormRenderer.java
2020-10-31 19:14:21 +01:00
Jacques Le Roux 15dc81a802 Fixed: variant product selection trashes image (OFBIZ-12019)
The variant products' images are being saved in the variable IMG encoded as urls,
thus selecting the variant triggers an image override with an unsuitable file name.

Thanks: Alex Bodnaru
2020-10-06 15:19:49 +02:00
holivier 009beb4b11 Improvement: Error messages when generating HTML and PDF file from AsciiDoc files (OFBIZ-11893)
minor correction, title level and anchor definition
2020-10-05 11:20:31 +02:00
holivier 72ae6c8e37 fixed: svg files not removed on clean (OFBIZ-11976)
Backport build.gradle correction from OFBIZ-12035, correction in generateAllPluginsDocumentation to put copy of OFBiz-Logo in doFirst to avoid it's run during gradle Configure project
2020-10-05 09:50:47 +02:00
Suraj Khurana 2fef06ba38 Fixed: Incorrect data issue for InvoiceItemTypeMap and ReturnItemTypeMap.
(OFBIZ-11971)
As we have returnItemTypeId as RET_MISC_ADJ, same should be used in ReturnItemTypeMap and corresponding InvoiceItemTypeMap.
Thanks Amit Gadaley for reporting and providing the patch.
2020-09-26 18:17:53 +05:30
Jacques Le Roux fcfca0d78d Improved: fixes the executionpolicy for last update of Windows 10
Thanks: Georg Potthast for report on user ML
2020-09-26 09:56:04 +02:00
Jacques Le Roux 41bbf15933 Fixed: Error while decoding url parameters with percent character (OFBIZ-12014)
This has been already fixed (an clearly explained) in OFBIZ-10275 and broken
again in OFBIZ-11822

Thanks: Pradeep Choudhary
2020-09-14 11:18:57 +02:00
Jacques Le Roux 207d8f8ac0 Fixed: display/selection of unit of measure is broken (OFBIZ-11955)
Improve code for UOM dropdown of products like WG-9943

Thanks: Alex
2020-09-11 10:44:55 +02:00
Akash Jain bceba04c6a Fixed: Display/functionality improvement in findParty of OOTB regarding classification group (OFBIZ-10302)
Thanks, Rajesh Kumar Mallah for report.
2020-09-01 16:09:44 +05:30
Jacques Le Roux d670f36713 Fixed: display/selection of unit of measure is broken (OFBIZ-11955)
Fixes UOM dropdown for products like WG-9943

Thanks: Alex
2020-08-31 10:45:15 +02:00
Jacques Le Roux b263ddc2d2 Revert "Improved: Improves service-eca.xsd documentation (OFBIZ-9994)"
This reverts commit 0231626f1c. These changes
should not have been backported
2020-08-31 09:13:33 +02:00
Jacques Le Roux 0231626f1c Improved: Improves service-eca.xsd documentation (OFBIZ-9994)
Fixes some issues

# Conflicts:
#	framework/service/dtd/service-eca.xsd
2020-08-30 18:59:27 +02:00
Jacques Le Roux 3b751db55e Fixed: display/selection of unit of measure is broken
(OFBIZ-11955)

This fixes in in order component

Thanks: Alex
2020-08-30 14:09:32 +02:00
Jacques Le Roux 9366d196af Documented: warns users about demo credentials in production 2020-08-29 10:08:48 +02:00
Akash Jain 4a37b68240 Fixed: Default value flags not working for configurable and variant products at the time of order entry (OFBIZ-10532)
Thanks, Deepak Nigam for report.
2020-08-27 18:15:28 +05:30
Jacques Le Roux 3abd7a2288 Improved: removes a nonsense word left during a C/P 2020-08-27 09:30:38 +02:00
Jacques Le Roux 9b9bc10092 Fixed: MessagingException in sendShipmentScheduledNotification service (OFBIZ-11984)
This MessagingException issue is with sendFrom,
please refer the the code blocks from minilang and groovy versions below:

<!-- find email address for currently logged in user, set as sendFrom -->
<entity-and entity-name="PartyAndContactMech" list="curUserPartyAndContactMechs">
    <field-map field-name="partyId" from-field="userLogin.partyId"/>
    <field-map field-name="contactMechTypeId" value="EMAIL_ADDRESS"/>
</entity-and>

<first-from-list list="curUserPartyAndContactMechs" entry="curUserPartyAndContactMech"/>
<string-append field="sendEmailMap.sendFrom" string="${curUserPartyAndContactMech.infoString}" prefix=","/>

There should not be a prefix, there is always only 1 sender
The sendOrderDeliveryScheduleNotification service was also affected

Thanks: Mridul Pathak for analyse
2020-08-26 19:51:47 +02:00
Jacques Le Roux 1a6f0e7bff Improved: svg files not removed on clean (OFBIZ-11976)
After removing the temporary diles in generateAllPluginsDocumentation
this removes them also in generatePluginDocumentation.

Despite that they still appear after simply running gradlew ofbiz (without any
change), I mean:
ofbiz-framework\plugins\birt\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\ebay\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\ldap\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\myportal\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\projectmgr\src\docs\asciidoc\images\OFBiz-Logo.svg
ofbiz-framework\plugins\solr\src\docs\asciidoc\images\OFBiz-Logo.svg

I have no ideas why :/
2020-08-25 15:05:32 +02:00
Jacques Le Roux a61fe713f2 Fixed: svg files not removed on clean (OFBIZ-11976)
Files like birt/src/docs/asciidoc/images/OFBiz-Logo.svg, in many plugins,
don't get removed on clean.

I simply missed to clean them in pluginAsciidoc Gradle task (OFBIZ-10677)

Thanks: Alex Bodnaru for report
2020-08-23 17:42:29 +02:00
Jacques Le Roux dbec7e766c Fixed: Bug in order manager main page when using Arab language (OFBIZ-9687)
It seems that we are getting the issue due to the special character "/" which is
present in OrderManager Uilabel.
I just changed the OrderManager Uilabel value from Buy / Sell Order Manager to
Order Manager and removed the special character "/".

Thanks: Mohammed Rehan Khan
2020-08-22 18:13:01 +02:00
Jacques Le Roux a8821c7a78 Revert "Fixed: Expiring Daemon because JVM heap space is exhausted (OFBIZ-11954)"
This reverts commit 547abb70d6.
2020-08-21 11:36:17 +02:00
Jacques Le Roux 547abb70d6 Fixed: Expiring Daemon because JVM heap space is exhausted (OFBIZ-11954)
Today I got this in log out of the blue:

  Daemon will be stopped at the end of the build after running out of JVM memory
  Expiring Daemon because JVM heap space is exhausted

I checked there was no OutOfMemoryError exception. And apart that in log, the
applications were running well

The most relevant articles I found on the Net were:
https://stackoverflow.com/questions/56075455/expiring-daemon-because-jvm-heap-space-is-exhausted
https://medium.com/@tiwarishani/expiring-daemon-because-jvm-heap-space-is-exhausted-in-react-native-e17c2248c8af

I'm not sure this issue will reproduce (why just now?). I'll discuss this on dev
ML before increasing org.gradle.jvmargs

Thanks: Daniel Watford to confirm on dev ML
2020-08-13 12:13:28 +02:00
Jacques Le Roux 26d150f709 Improved: Add a title to Javadoc overview (OFBIZ-)
We can add a global version heading using the Gradle title Javadoc option:
https://docs.gradle.org/current/dsl/org.gradle.api.tasks.javadoc.Javadoc.html

Relates to https://markmail.org/message/t3svau3udlwaa7mq
2020-08-12 15:41:25 +02:00
Jacques Le Roux 131592465b Improved: ASL2 header was missing in checkstyle.xml 2020-08-08 16:54:33 +02:00
Jacques Le Roux 69c5f674e7 Fixed: Make all related Cancel/Done buttons return to backHome ie. party profile page (OFBIZ-11943)
Thanks: Priya for the patch
2020-08-06 12:48:15 +02:00
Akash Jain a290fbb348 Fixed: View Image button on order view page fails to render the image (OFBIZ-11734)
Thanks, Arpit Mor for reporting.
2020-08-04 15:58:56 +05:30
Jacques Le Roux 1866a3c464 Fixed: Server-Side Template Injection using Static (OFBIZ-11871)
Thanks to Alvaro's explanations, the problem was in MacroFormRenderer where, for
lookups, we retrieve _LAST_VIEW_NAME_ as a parameter without encoding it.

Thanks: Alvaro for advice

Conflicts handled by hand in UtilHttp.java
2020-08-03 11:02:32 +02:00
Jacques Le Roux 35430d804a Improved: changes content of VERSION file added during INFRA-19443 2020-07-29 11:46:32 +02:00
Jacques Le Roux 070297b3a1 Fixed: Inconsistent String Comparisons (OFBIZ-9254) & Uploading image to data resource (OFBIZ-10834)
Changes made in startsWith and indexOf methods in ContentManagementServices
for OFBIZ-9254  where wrong (reversed). Fortunately only place where this happened.

I added a comment to make clear why we have 2 empty else if

I'll backport later, conflicts to handle by hand...

Thanks: Ankush Upadhyay for spotting the bug

Conflicts handled by hand
2020-07-27 14:30:18 +02:00
Jacques Le Roux e5860cc11b Fixed: Unable to create event in SFA component (OFBIZ-9901)
The tests failed because CAL_OWNER instead of CONTACT was necessary

Conflicts handled by hand in WorkEffortTests.xml
2020-07-25 19:21:08 +02:00
Jacques Le Roux 30c0d6d7af Fixed: One page checkout is broken because of ordermgr::getAssociatedStateList (OFBIZ-11838)
On orderview screen at the ordermgr, when a user tries to change the status of
the order, in OrderInfo.ftl, we are calling "changeOrderStatus" request as

<@ofbizUrl>changeOrderStatus/orderview</@ofbizUrl>

Hence when the request is done, it is rewriting URL to
https://localhost:8443/ordermgr/control/changeOrderStatus/orderview.

When js functions running in the backend like "getAssociatedStateList" are
called, they are getting the wrong URL to send a request to. This was causing
the issue.

For now, there are two different fixes that can handle both problems which are
mentioned in OFBIZ-2562 and OFBIZ-11838.

1.
  To change the request mapping for "changeOrderStatus" and add request-redirect
  to "orderview" screen. Change the actions in the forms in OrderInfo.ftl to
  call "changeOrderStatus" request only and then remove code in
  "getAssociatedStateList" js function to rewrite URL.

2.
  To add .length to the existing URL rewrite code written in
  "getAssociatedStateList" js function as

if (jQuery('#orderViewed').length) {
    requestToSend = "/ordermgr/control/getAssociatedStateList"
}

Thanks: Pritam Kute!

I picked the 2nd solution
2020-07-25 19:19:32 +02:00
Aditya Sharma b5ae3a5b71 Fixed: Unable to create event in SFA component (OFBIZ-9901)
When creating event for the party other than the loggedin user, the party should be in CAL_OWNER role to be added to event. Added appropriate check in service along with the error message.
Thanks Rubia Elza Joshep for reporting the issue and Aditi Patidar for providing the patch
2020-07-25 18:53:50 +05:30
Jacques Le Roux afda5fa4be Improved: Adds missing jGrowl map file (OFBIZ-11892)
Picked from
https://cdnjs.cloudflare.com/ajax/libs/jquery-jgrowl/1.4.6/jquery.jgrowl.map

Thanks to Alex Bodnaru
2020-07-23 09:13:11 +02:00
Jacques Le Roux 70c4a8aea7 Improved: Reflected XSS in content component (OFBIZ-11840)
Fixes a Reflected XSS vulnerability in content component

Harshit Shukla reported it to the OFBiz security team:
https://demo-stable.ofbiz.apache.org/content/control/stream?contentId="><svg/onload=alert(0)>

It's a post-auth vulnerability so we did not ask for a CVE.

Thanks: Harshit Shukla harshit.shukz@gmail.com
2020-07-18 12:09:20 +02:00
Jacques Le Roux 056088978d Improved: Hard coded label in ProductUomDropDownOnly (OFBIZ-11891)
The select label is not receiving translations.

There are more related issues, but this is independent.

Thanks: Alex Bodnaru
2020-07-16 14:34:53 +02:00
Jacques Le Roux ffd7746acc Improved: adds a link to the HTML and PDF versions on the web site 2020-07-12 11:49:59 +02:00
Aditya Sharma 19c29dacaa Fixed: checkstyle maxErrors value (OFBIZ-11251) 2020-07-11 20:52:09 +05:30
Aditya Sharma 6f1907785d Improved: Used 'checkstyle' linting tool (OFBIZ-11251)
Linting [1] is a software engineering practice which make the code
more readable and maintainable by improving its consistency and
avoiding potential programming mistakes.

Gradle provides a core plugin for the ‘checkstyle’ tool [2][3] which
provides such facility. The lint actions are triggered when running
‘gradle check’.

There are a lot reported errors that will need to be fixed
incrementally in the future. We ensure that new errors will not be
introduced by defining a global threshold of “allowed” errors
corresponding to the sum of errors currently found in the framework
and in the official plugins.

[1] https://en.wikipedia.org/wiki/Lint_(software)
[2] https://checkstyle.org/
[3] https://docs.gradle.org/current/userguide/checkstyle_plugin.html

Thanks Mathieu Lirzin for the contribution and Taher Alkhateeb & Jacques Le Roux for their feedback
2020-07-11 20:49:50 +05:30
Jacques Le Roux 546de4eb1a Fixed: MODULE is not module :/ (backporting is never easy!) 2020-07-11 11:18:52 +02:00
Jacques Le Roux ecc4e84a95 Fixed: don't remove localhost from host-headers-allowed this was only for testing 2020-07-11 09:57:04 +02:00
Jacques Le Roux fd3667b6f7 Improved: Put the AsciiDoc files in main repo under the web site (OFBIZ-11879)
We have AsciiDoc files in main repo and it would be better to have them also in
HTML format under the web site: https://ci.apache.org/projects/ofbiz/site

For that a new generateReadmeFiles is needed and new "readme" locations under
each of https://ci.apache.org/projects/ofbiz/site "sub-dirs".
We can create those from Buildbot like we did with INFRA-20311
2020-07-11 09:47:37 +02:00
Jacques Le Roux c70fa51ae7 Improved: better message for host-headers-allowed
Adds an explanation about what to do when using own domain.

Some users don't look into the log so it's better to set also the exception
message in order for them to have it right at 1st glance.

Conflicts handled in webapp/control/RequestHandler.java
2020-07-11 09:47:23 +02:00
Jacques Le Roux c5ba62e3e0 Improved: Adds information to install without the demo data 2020-07-08 10:33:56 +02:00
Michael Brohl b791dca9e7 Fixed: Added missing AJP connector property introduced for Tomcat 9.0.31
(OFBIZ-11848)
2020-07-03 17:35:17 +02:00
Suraj Khurana b31ed9c4ad Fixed: Console warnings related to OrderHeader caching.
(OFBIZ-11858)
Thanks Praveen Sharma for the patch and Jacques for review.
2020-07-02 10:58:28 +05:30
Jacques Le Roux 466e426f8b Improved: BigDecimal casting in Groovy (OFBIZ-11862)
It's not a bug here, but casting is not necessary, better keep things simple
2020-06-30 15:06:51 +02:00
Michael Brohl f1bf6a5a13 Fixed: Upgrades Tomcat to 9.0.36 due to CVE-2020-11996 (OFBIZ-11848) 2020-06-28 12:46:58 +02:00
Pawan Verma 11dedfa79f Fixed: EntityQuery queryCount is throwing error with distinct method (OFBIZ-11294)
Added missing support for selectFields in queryCount and all the subsequent methods.

Thanks: Deepak Dixit for the review.
2020-06-28 01:41:57 +05:30
Jacques Le Roux 8358c299e0 Fixed: With Rainbow theme, a scrollbar appears at bottom where it's not needed
(OFBIZ-10174)

With Rainbow theme, even in large screens, a scrollbar appears at bottom where
it's useless.

The CSS which is adding a border-right on the application bar is adding extra
1px width causing this issue. Attached the patch to remove extra width for the
same.

Thanks: Nameet Jain for the patch
2020-06-27 16:16:01 +02:00
Jacques Le Roux 47b16d4044 Fixed: IDOR vulnerability in the order processing feature in ecommerce component (OFBIZ-11836)
Fixes a bug when there are no problem viewing the order, my bad
2020-06-27 10:46:33 +02:00
Jacques Le Roux 34c02e3bde Fixed: IDOR vulnerability in the order processing feature in ecommerce component (OFBIZ-11836)
https://demo-stable.ofbiz.apache.org/ecommerce/control/order.pdf?orderId=WSCO10000

In the above URL, the parameter 'orderId' has the value 'WSCO10000' and after
incrementing the value to 'WSCO10001' or 'WSCO10002' will download the receipt
of other orders which have been placed by other users.

All the available order receipts can be downloaded by running an automated tool
(Burp Intruder) on the parameter 'orderId=WSCOXXXXX'

I have successfully tested this by using 2 different accounts: DemoCustomer and
DemoCustomer2

An attacker can download order receipts of other users and this could lead to
information disclosure.

The only real solution to this issue is to implement access control. The user
needs to be authorized for the requested information before the server provides
it.

Thanks: Harshit Shukla [mailto:harshit.shukz@gmail.com]reported this IDOR
vulnerability to the OFBiz security team, and we thank him for that.
2020-06-26 09:29:25 +02:00
Jacques Le Roux b376a2f4b9 Fixed: getEntityRefData service has a weird issue (OFBIZ-11401)
MODULE does not exist in R18 (I did by hand in R17 so did not miss it...)
2020-06-18 18:26:39 +02:00
Jacques Le Roux 1e5ffa6e4c Fixed: getEntityRefData service has a weird issue (OFBIZ-11401)
It's reproductible on trunk demo though only visible in log, UI shows no issue

R17 and R18 are also affected, R16 is OK.

Ankush: This stacktrace should be coming for all entities where
default-resource-name is defined on entity definition but no property exist in
defined resource for key EntityDescription.entityname and FieldDescription.field.

As we want to have these entity labels as much as possible, we can simply print
warning about the missing entity descriptions and field descriptions for
readability purpose instead of printing huge exceptions stacktrace.

Thanks: Ankush Upadhyay and Pierre Smits for the help

Conflicts handled by hand (swallowing exceptions is lazy and bad :p)
2020-06-18 17:45:57 +02:00
Jacques Le Roux d2a976a592 Fixed: Double encoded urls are not being decoded (OFBIZ-11822)
This was broken by OFBIZ-10275

Thanks: Alex Bodnaru
2020-06-15 13:31:04 +02:00
Aditya Sharma 962e2495d4 Fixed: console error TypeError: document is undefined
(OFBIZ-11752)

As the document object was not passed to the IFFE call for the FORMALIZE function, it gives console error for the missing document object when accessed
2020-06-11 20:07:51 +05:30
Aditya Sharma 6ff83fb452 Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-11752)

Upgraded jQuery to 3.5.2 and jQuery migrate to 3.3.0 to vulnerabilities of medium severity
Regex in its jQuery.htmlPrefilter sometimes may introduce XSS; https://blog.jquery.com/2020/04/10/jquery-3-5-0-released/
2020-06-11 20:07:33 +05:30
Jacques Le Roux b9780b2031 Improved: Removes plugins as a submodule (OFBIZ-8459)
This was wrongly put in with several commits done for OFBIZ-8459 where plugins
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=b39c179
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=3a4d22
https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=bda6192
2020-06-09 16:10:34 +02:00
Jacques Le Roux 324edc9e8a Fixed: plugins in common-theme/webapp/common/js is not monitored by git (OFBIZ-11745)
In .gitignore in root ofbiz directory there is plugins/

so all directory plugins are ignored

if the line is replace by /plugins/ only root directory plugins is ignored

Can't cherry-pick so trying by hand (easy stuff)

Thanks: Olivier
2020-06-09 14:49:16 +02:00
Jacques Le Roux a4227abee0 Improved: no functional change
Adds missing ASL2 licenses

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1860259 13f79535-47bb-0310-9956-ffa450edef68
2020-06-09 11:48:38 +02:00
Suraj Khurana 0d285ccaeb Fixed: Unnecessary iterations and setting inventory for all productFacilities in setLastInventoryCount.
(OFBIZ-11796)

Instead of updating all product facilities records on one inventory item change, we should be changing only specific product facility record for that the inventory item belongs to. Thanks Jacques, Pierre, Pawan and Arun for the review.
2020-06-08 18:01:45 +05:30
holivier 4568c6f55a Improvement: Help link using asciidoc files via generated html
(OFBIZ-11693)

Change release to 18.12 for all asciidoc files where there is still
17.12
2020-06-05 14:37:03 +02:00
Pawan Verma 1d3c7915c9 Fixed: startup-service does not work without runtime-data-id(OFBIZ-11668) 2020-06-02 17:25:51 +05:30
Pawan Verma a4f0563b31 Fixed: Overview of shipments shows links to edit shipment it should point to viewshipment(OFBIZ-11787)
Thanks: Pierre for your contribution.
2020-06-02 17:15:56 +05:30
Pawan Verma 1b76a5a5d4 Fixed: UI issue in payment lookup(OFBIZ-9476)
Thanks: Pallavi for report and patch and pierre from the review.
2020-06-02 16:37:49 +05:30
Pawan Verma 523a84f0bd Fixed: ViewShipment in facility does not show phone details(OFBIZ-11785)
Thanks, Pierre for the report.
2020-06-02 15:34:58 +05:30
Jacques Le Roux 9e2c7a10a4 Improved: adds pull_request_template.md (OFBIZ-11722)
Forgot to commit the replacement
2020-05-31 08:48:33 +02:00
Aditya Sharma 955319862e Fixed: RequestHandlerException due missing controller entries
(OFBIZ-9478)
Fixed missing Lookup controller entries for the following pages:
1. LookupBudget for Employment Applications page of party
2. LookupDataResource for Content page of facility
3. LookupFixedAsset for Inventory Items Details page of facility

Thank you Pallavi Goyal for reporting the issue and Humera Khan for providing the patch
2020-05-31 09:56:32 +05:30
Pawan Verma 73bfbc643b Fixed: Corrected package path for UtilDateTime.(OFBIZ-6408) 2020-05-30 23:08:33 +05:30
Pawan Verma b35dd06905 Fixed: Adding a group order generates an error(OFBIZ-6408)
The error is caused by an invalid expression, the two boolean evaluations should reside in the same groovy scriptlet.

Thanks, Pierre for report, Scott for the solution and Adrian, Jacques, Rahul for the review.
2020-05-30 15:37:30 +05:30
holivier 88f87f27f0 fixed: sort-order (field) not works in CompoundWidgets file (OFBIZ-11708)
In a form, when <sort-order tag is used, the children analyze not works
because, getTagName() is used not the getLocalName(). getTagName()
return "wf:sort-field" when getLocalName return "sort-field".
So change getTagName() to getLocalName() for sort-order children
2020-05-29 11:48:25 +02:00
holivier 6e845ccfc4 Fixed: drop-down field not work when in a compound-widget file (OFBIZ-11676)
When, in ModelFormField, FieldInfoWithOptions (which read xml file ) is
call, test on tag name is done with getName() and not getLocalName() so
none "option" is recognize when field is declare on a compound-widget
file. getName() is change to getLocalName()
2020-05-29 11:35:48 +02:00
Pawan Verma 807555a657 Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)
Thanks, Jacques for the report.
2020-05-28 19:59:33 +05:30
Pawan Verma e8df7d5329 Revert "Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)"
This reverts commit f610b288b0.
2020-05-28 19:53:37 +05:30
Pawan Verma f610b288b0 Fixed: productServiceOrder-test issue, it has been introduced after we fixed InventoryItemStatus is not updated to INV_PROMISED status(OFBIZ-8459)
Thanks, Jacques for the report.
2020-05-28 19:45:51 +05:30
Pawan Verma 025cc09588 Fixed: InventoryItemStatus is not updated to INV_PROMISED status while creating sales order for serialized product(OFBIZ-8459)
Thanks, Vaibhav for the report and patch and Pranay for the review.
2020-05-28 17:26:05 +05:30
holivier 9c51ae4289 Documented: theme/README.md change theme/README.adoc but with very
simple content
(OFBIZ-11574)

README.md  has been migrated to asciidoc as doc/themes.adoc previously
but remove README.md has been forgot.
In this commit README.md is removed and a new README.adoc is created
with only a brief component definition and link to the theme
documentation (and developer-manual which included theme.adoc)
2020-05-26 17:37:47 +02:00
holivier 59be769be4 Documented: datamodel markdown migration to asciidoc
(OFBIZ-11574)

- DATAMODEL_CHANGE migration to asciidoc and add a included in
developer_manual
- Readme migration to asciidoc
2020-05-26 17:37:44 +02:00
Jacques Le Roux 742802afbd Documented: Create a simple INSTALL file with minimum installation information and redirection to more documentation
(OFBIZ-11691)

Following https://markmail.org/message/xi2bcvnmpdfvfgk2 discussion on dev ML
here is the file I suggest. If we are OK we can backport it to the supported
release branches. Of course I'm open to modifications...

Thanks for their answers: Deepak Nigam, Michael Brohl, Pierre Smits and
Taher Alkhateeb
2020-05-25 18:18:51 +02:00
Aditya Sharma 9925fad92a Fixed: Requesthandler exception is showing after clicking cancel/done button on editPerson screen
(OFBIZ-10890)
Set the value of missing parameter.
Thanks Minal Phalak for reporting and providing the patch
2020-05-23 17:34:36 +05:30
Aditya Sharma 754414d158 Fixed: paginateOrderList does not find orders on next page specific to FindOrders.ftl
(OFBIZ-11356)
Adding the missing showAll flag in the paginateOrder form because of which the orders were not shown while submitting the next button.
Thanks Michael Brohl for reporting the issue and Ankit Joshi for providing the patch
2020-05-23 16:21:41 +05:30
Jacques Le Roux d955b03fdc Fixed: Apache OFBiz unsafe deserialization of XMLRPC arguments (CVE-2020-9496)
(OFBIZ-11716)

Because the 2 xmlrpc related requets in webtools (xmlrpc and ping) are not using
authentication they are vulnerable to unsafe deserialization.

thanks: Alvaro Munoz <pwntester@github.com> from the GitHub Security Lab team
2020-05-19 15:58:53 +02:00
Pawan Verma aea665a0e7 Fixed: Issue with redirect queryParameters when the user is logged out
(OFBIZ-11714)

In OFBIZ-10539, We missed removing the line which was adding parameters into the map as Ritesh suggested a good way to handle parameters. I've removed that redundant line of code and attaching a patch for the same.
2020-05-19 17:23:25 +05:30
Jacques Le Roux a67508c29c Improved: Prevent FreeMarker Template Injection (SSTI)
(OFBIZ-11709)

Better style with line not too long
2020-05-18 22:51:24 +02:00
Jacques Le Roux 191798f3af Improved: Prevent FreeMarker Template Injection (SSTI)
(OFBIZ-11709)

Fixes a typo: module instead of MODULE
2020-05-18 15:37:30 +02:00
Jacques Le Roux 07f48a3334 Improved: Prevent FreeMarker Template Injection (SSTI)
(OFBIZ-11709)

Previous code compiled but the class was not found, better KISS
2020-05-18 14:04:15 +02:00
Jacques Le Roux b97d6bf1e2 Improved: Prevent FreeMarker Template Injection (SSTI)
(OFBIZ-11709)

Some people may want to use another TemplateClassResolver than SAFER_RESOLVER
This creates a new templateClassResolver security property and uses it in
FreeMarkerWorker::makeConfiguration by default

Conflicts handled by hand
  framework/security/config/security.properties
2020-05-18 13:29:20 +02:00
Jacques Le Roux d2274170b4 Fixed: Prevent FreeMarker Template Injection (SSTI)
(OFBIZ-11709)

Since Freemarker 2.3.17 a known solution to these issues is to register a
TemplateClassResolver in Freemarker configuration in order to limit which
TemplateModels can be instantiated in the templates. The predefined resolver
SAFER_RESOLVER doesn't allow to instantiate the Execute class[4].

So the solution is to add the line
    newConfig.setNewBuiltinClassResolver(TemplateClassResolver.SAFER_RESOLVER);
in FreeMarkerWorker.java

Conflicts handled by hand
2020-05-16 20:52:51 +02:00
Pawan Verma e15c82b254 Fixed: Theme files loading taking longer time
(OFBIZ-11665)

Thanks: Pierre and Jacques for the review.
2020-05-10 14:18:11 +05:30
Pierre Smits 10e9d3809d Fixed: ListParty doesn't show middleName
(OFBIZ-11681)

Fixes a logic error
2020-05-09 16:07:52 +02:00
Pawan Verma ae511e4740 Fixed: Promised Datetime & Current Promised Date values not getting updated in OISGIR Entity
(OFBIZ-10538)

Thanks: Deepak, Taher, Ravi, Amit, Suraj for the contribution.
2020-05-06 11:52:51 +05:30
Pawan Verma caceb7c53b Fixed: Issue with opening a page via bookmark when the user is logged out
(OFBIZ-10539)

Thanks: Ritesh Kumar for report and the patch and Girish for the review.
2020-05-05 14:57:30 +05:30
Pawan Verma 8eb193d250 Fixed: Creating custom Time Period does not show in party time period
(OFBIZ-10904)

Thanks, Pierre and Jacques for your contribution.
2020-05-04 15:21:02 +05:30
Jacques Le Roux c7a81dbc6b Improved: Improve ObjectInputStream class
(OFBIZ-10837)

While working on OFBIZ-11633 I crossed an issue in R18 (not in trunk) where
objects from org.apache.commons.fileupload (namely DiskFileItem and
FileItemHeadersImpl) are not serializable.

While at it I decided to handle at the SafeObjectInputStream level
the "fileItems" case I already crossed with, OFBIZ-11534, in RequestHandler

It has an inconvenient in R18 (not in trunk) where ObjectInputStream can't
handle a null class (of course) and so return a benign exception in log (only).

I believe it's better to handle these specific cases at the lower possible
level in all supported branches.
2020-05-02 12:36:14 +02:00
Jacques Le Roux f2191b2115 Fixed: PartyProfileContent.js does not work
(OFBIZ-11633)
When you upload a content from the party profile page you don't see a progress
bar. The PartyProfileContent.js is loaded but for some reason is unused or wrong

Mohammad Kathawala mentionned that it was removed with OFBIZ-9299
It was also broken with OFBIZ-11402

Thanks: Mohammad for the track

Conflicts
removed framework/common/groovyScripts/CommonServices.groovy
2020-05-02 09:34:08 +02:00
Suraj Khurana 55119ef5f5 Fixed: Incorrect value in entity-auto invoke for removeProductFeatureDataResource.
(OFBIZ-11614)

It was may be a typo introduced in rev 1728261, fifty months ago.
2020-04-30 17:03:30 +05:30
Pawan Verma 8e2bb295cf Incorrect column alias in EntitySQLProcessor for sql query working with mysql
(OFBIZ-11573)

More details: Method getColumnLabel returns the designated column's suggested title for use in printouts and displays. Method getColumnName returns the designated column's name.

Thanks: Suraj and Jacques for the review.
2020-04-28 10:57:15 +05:30
Pawan Verma 9e60ec7739 Fixed: Create Exchange Order button on Return screen is distorted
(OFBIZ-11144)

Thanks: Devanshu for the report, Suraj and Jacques for the review.
2020-04-28 10:12:48 +05:30
Jacques Le Roux 54283206ad Fixed: Compound-widget not works with condition
(OFBIZ-11606)

Fixes a compilation issue due to backporting a line too much
2020-04-27 18:16:06 +02:00
Jacques Le Roux 1bdd636146 Fixed: Compound-widget not works with condition
(OFBIZ-11606)

Fixes "<**:condition" not well managed and generating an error

Changes all the getNodeName() by getLocalName() in the ModelX****Condition.java

Thanks: Olivier
2020-04-27 17:44:55 +02:00
Jacques Le Roux 0805e57f08 Fixed: Compound-widget not works with condition
(OFBIZ-11606)

rootElement is not correct for a compound file, it's necessary to do a
UtilXml.firstChildElement(rootElement, "forms"); to be correct.
It's done for screen, form but not for grid !

So correction is now added the correct read of rootElement.

Thanks: Olivier
2020-04-27 14:33:23 +02:00
Deepak Dixit 81a14e86ff Fixed: Used the jdk 8 compatible version for gradle-svntools-plugin
(OFBIZ-11601)
build.grale using latest.release of gradle-svntools-plugin, and gradle-svntools-plugin release its latest release on 19th with jdk11 compatible. So this is causing build failure
2020-04-20 11:38:39 +05:30
Jacques Le Roux b2614b5ddf Fixed: Error removing an uploaded party content
(OFBIZ-11597)

When you try to remove an uploaded party content you get this error:

ControlServlet                |E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException:
Unknown request [removePartyContent/viewprofile];
this request does not exist or cannot be called directly.

While at it I also fixed the similar case for payment methods
2020-04-17 17:20:25 +02:00
Jacques Le Roux d9e20d4dab Improved: Ignores /upload 2020-04-16 16:11:34 +02:00
Jacques Le Roux 51b2b628ae Fixed: Error in uploading very large files, ie >2MB
(OFBIZ-11534)

This was not supposed to be committed, actually (wrong) part of OFBIZ-11597
2020-04-16 16:08:39 +02:00
Jacques Le Roux 711ca41715 Fixed: Error in uploading very large files, ie >2MB
(OFBIZ-11534)

There is an issue in uploading large files, I am able to upload files up to 2 GB
successfully but getting an error when trying to upload a file larger than 2GB.

Example -
1. Go to party profile -
https://demo-trunk.ofbiz.apache.org/partymgr/control/viewprofile?partyId=admin
2. Try to create a party content with a file larger than 2 GB
3. Error on console

jleroux:
For a 2GB+ file you need to set Xmx to more than the double of the file size,
eg: gradlew ofbiz -PjvmArgs="-Xms1024M -Xmx5048M"

You then get another small issue (only in log) when redirecting to send the
partyId parameter.

This is because, DiskFileItem is a temporary Object with a null value contained
in "fileItems" attribute. It can't be detected by UtilMisc::makeMapSerializable
and that makes "fileItems" not serializable. So it must be removed from
reqAttrMap.

Thanks: Chandan Khandelwal for report, Michael for suggesting a very large file
to upload
2020-04-16 16:08:17 +02:00
Jacques Le Roux 3e22e45c36 Documented: Adds the CSRF defense documentation (missed the add last time) 2020-04-15 19:42:39 +02:00
Jacques Le Roux 18b3fa80ad Documented: Adds the CSRF defense documentation 2020-04-15 19:37:48 +02:00
Jacques Le Roux 7e9492d2dc Improved: Adds the download-the-gradle-wrapper section 2020-04-07 15:32:49 +02:00
Ulrich Heidfeld 46b0803aa2 Improved: Decodes AjaxAutocompleteOptions return value
(OFBIZ-11475)
2020-04-05 14:00:44 +02:00
Jacques Le Roux f29c62e9b6 Improved: prevent [rawtypes] found raw type: List at RequestHandler.java:85 2020-04-05 12:16:02 +02:00
Jacques Le Roux 5530e23738 Fixed: Prevent Host Header Injection (CVE-2019-12425)
(OFBIZ-11583)
2020-04-05 11:35:33 +02:00
Jacques Le Roux 9fa3dbe1ea Revert "Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk"
This reverts commit 0add8bedbc.
2020-04-05 10:04:15 +02:00
Jacques Le Roux 0add8bedbc Merge branch 'JacquesLeRoux-POC-for-CSRF-Token-OFBIZ-11306' into trunk
Because of GitHub message on PR56:
This branch cannot be rebased due to conflicts

Conflicts handled by hand
RequestHandler.java
2020-04-04 18:33:11 +02:00
Jacques Le Roux 8f51785dab Fixed: The createTaskContent request does not work
(OFBIZ-11246)

It seems that same request can not be parsed multiple times if it has multi part
object in it as the parse method remove it after that.

Found one stackoverflow link around the same:

https://stackoverflow.com/questions/13881272/
servletfileuploadparserequestrequest-returns-an-empty-list

I believe that all places/uploads using this workflow should resulting the same
issue.

One possible solution I could think of without going with new approach is to set
list of file Items into the request attribute and use it if parse method remove
it and unable to retrieve on 2nd call.

Thanks: Ankush Upadhyay for the analysis and initial patch. I only slightly
modified it.
2020-03-27 11:08:38 +01:00
Jacques Le Roux b466b96741 Improved: Improve Web Content Caching
(OFBIZ-11477)

According to OWASP OFBiz Web Content Caching is weak:

Independently of the cache policy defined by the web application, if caching web
application contents is allowed, the session IDs must never be cached, so it is
highly recommended to use the Cache-Control: no-cache="Set-Cookie, Set-Cookie2"
directive, to allow web clients to cache everything except the session ID

I though noticed that Set-Cookie2 is deprecated for a long time now. And we new
browsers policies it to often updated. So no need to use Set-Cookie2.
2020-03-27 10:11:14 +01:00
Jacques Le Roux d08a0527c4 Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

It's better to allow users to change from strict to lax, at least for all
cookies. Some could want to change it by cookie type. I let the exercise for
them :)
See:https://blog.mozilla.org/security/2018/04/24/same-site-cookies-in-firefox-60
2020-03-21 11:56:39 +01:00
Jacques Le Roux 162f3847cb Improved: no functional change
Adds "Content-Security-Policy" frame-ancestors="self" in ErrorPage.ftl
Because this page is used as a HTTP 500 error it's more susceptible to
clickjacking

Quoting OWASP ZAP:
This problem still applies to error-type pages (401, 403, 500, etc.), as these
pages are still often affected by injection problems, in which case it is still
possible that browsers may interpret pages differently from their actual content
type.

I tried to work on other file types that were also reported but it's complicated
adn I believe it's not worth it
2020-03-20 20:20:58 +01:00
Jacques Le Roux c3dd26c6ef Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

Forgot to add UtilHttp::SameSiteFilter
2020-03-20 18:05:07 +01:00
Jacques Le Roux 3d8c00fceb Fixed: Ensure that the SameSite attribute is set to 'strict' for all cookies.
(OFBIZ-11470)

As reported by OWASP ZAP:
A cookie has been set without the SameSite attribute, which means that the
cookie can be sent as a result of a 'cross-site' request. The SameSite attribute
is an effective counter measure to cross-site request forgery, cross-site script
inclusion, and timing attacks.

The solution was not obvious in OFBiz for 2 reasons:

1. There is no HttpServletResponse::setHeader. So we need to use a filter
  (SameSiteFilter) and even that is not enough because of 2:
2. To prevent session fixation we force Tomcat to generates a new jsessionId,
ultimately put in cookie, in LoginWorker::login. So we need to add a call to
SameSiteFilter::addSameSiteCookieAttribute in
UtilHttp::setResponseBrowserDefaultSecurityHeaders.
2020-03-20 17:51:45 +01:00
Jacques Le Roux 6787d21522 Fixed: Propagate the theme in DataResourceWorker.renderDataResourceAsText()
Improved: no functional change

(OFBIZ-9923)

Seems that this has been fixed with OFBIZ-11466 "CommonTheme has a dependency on
Flatgrey application.js"

Thanks: Pierre Smits for the fix in OFBIZ-11466
2020-03-20 09:37:16 +01:00
Jacques Le Roux 2dafa8c85f Fixed: CommonTheme has a dependency on Flatgrey application.js
(OFBIZ-11466)

In theme.xml of common-theme there is a reference to application.js residing in
the Flatgrey theme. This should not be. The file should be in common-theme.

Thanks: Pierre Smits for report and fix. I have just also removed
rainbowstone/js/application.js since it's now in common-theme
2020-03-19 11:18:09 +01:00
Jacques Le Roux 8f9152b8a4 Improved: no functional change
Follows the "How to apply the Apache License to your work" section at
https://www.apache.org/licenses/LICENSE-2.0

Removes the references to products only used in plugins
2020-03-14 12:35:59 +01:00
Dennis Balkir f96b834e01 Fixed: Potential Nullpointer in ErrorPage.ftl
(OFBIZ-11448)

Inserted nullcheck for request-attribute
2020-03-10 16:04:09 +01:00
Jacques Le Roux 370159feeb Merge pull request #37 from danwatford/ofbiz-11418-backport18.12
OFBIZ-11418: Backport -  Use FlexibleStringExpander in form widget lookup field target parameters
2020-03-09 10:55:02 +01:00
Daniel Watford 2981ad988e Improved: Add 2020 version of Incoterms
(OFBIZ-11437)

Alter the parent type and descriptions of existing Incoterm TermTypes to
indicate the version of Incoterms they relate to.

Added new Incoterm TermTypes and descriptions correspoding to the
Incoterms 2020 set.
2020-03-06 08:46:11 +01:00
Jacques Le Roux 667a2018b9 Fixed: createMissingCategoryAndProductAltUrls service misses a transaction
(OFBIZ-11441)

Not sure why it had use-transaction="false", makes no sens to me, too old to
check, not a big deal I guess

# Conflicts:
#	applications/product/servicedef/services.xml
2020-03-05 10:11:53 +01:00
Jacques Le Roux 38deff91ac Merge pull request #42 from danwatford/ofbiz-11437-2020-incoterms-improvement
OFBIZ-11437: Improved: Added 2020 version of Incoterms
(cherry picked from commit 7a34e9cda8)
2020-03-04 15:09:39 +01:00
Daniel Watford 308982526d Documented: Backport - Documented use of field attribute parameter-name and
lookup field attribute target-parameter in widget-form.xsd

(OFBIZ-11418)

Backport cherry-picked from commit
5640de4eba.
2020-03-02 09:35:31 +00:00
Daniel Watford b518a5df2e Improved: Backport - Use FlexibleStringExpander in form widget lookup
field target parameters.

(OFBIZ-11418)

Changed target-parameter attribute of the form widget's Lookup field to
use the FlexibleStringExpander type rather than String. This has been
done to allow reference to other form fields which may have had their
parameter-name attribute set to a FlexibleStringExpander expression.

Backport cherry-picked from commit
08a371d047 with ModelFormFieldTest
removed.
2020-03-02 09:29:51 +00:00
Jacques Le Roux 028b122cba Improved: Put the TOCs on left in generated AsciiDoc documentation
(OFBIZ-11423)
Following discussions

* AsciiDoc generated online documentation and releases
* New Online Help, need some ideas
threads on dev ML

I propose as suggested Oliver to put TOCs at the left. If I refer to
https://github.com/asciidoctor/asciidoctor-gradle-plugin/issues/119
toc: 'left@'
should be put in the main build.gradle

Thanks: Olivier Heintz for the suggestion
2020-02-27 08:42:10 +01:00
Suraj Khurana 9b3968ef11 Fixed: Picklist is in Input status even after order is completed.
(OFBIZ-10883)

Thanks Rashi Dhagat for reporting, Shikha Jaiswal for the patch and Pawan Verma for review.
2020-02-26 19:25:25 +05:30
Jacques Le Roux d2128ffeaa Fixed: DatabaseUtil.getColumnInfo(...) does not retrieve primary keys due to
connection-locks
(OFBIZ-11312)

The method DatabaseUtil.getColumnInfo(...) uses an elaborate algorithm using a
List<Future<AbstractCountingCallable>> object. This does not work properly as it
runs into connection-locks. When debugging the error does not occur. I assume
that the slower pace of debugging prevents the error.

Thanks: Benjamin Jugl

# Conflicts:
#	framework/entity/src/main/java/org/apache/ofbiz/entity/jdbc/DatabaseUtil.java
2020-02-26 08:41:37 +01:00
Michael Brohl f4d96deeca Fixed: Fluent API Bug in getFieldList().
(OFBIZ-10298)

Thanks Benjamin Jugl for reporting and providing the patch.
2020-02-25 21:15:49 +01:00
Michael Brohl 57b6e539f7 Documented: Upgrades the documentation references in
catalina/ofbiz-component.xml to the 9.0 documentation.
2020-02-25 15:55:33 +01:00
Michael Brohl 42884da20c Upgrade Tomcat from 9.0.29 to 9.0.31
(OFBIZ-11407)

Overriding the new default property secretRequired to be not required
and added the default property "secret" in the commented out section.
2020-02-25 15:55:32 +01:00
Michael Brohl 018ebbb265 Upgrade Tomcat from 9.0.29 to 9.0.31
(OFBIZ-11407)

Overriding the new default property secretRequired to be not required
and added the default property "secret" in the commented out section.
2020-02-25 15:49:18 +01:00
Jacques Le Roux 3856b0aebe Upgrade Tomcat from 9.0.19 to 9.0.31
(OFBIZ-11407)

Backported by hand (cherry pick failed) because of CVE-2020-1938
2020-02-25 15:37:17 +01:00
Daniel Watford 1bd2caae4a Improved: Backport - Use FlexibleStringExpander for field parameter names.
(OFBIZ-11415)

Allows generation of unique names when repeating rendering of a form on a screen.

Backport cherry-picked from commit 52e21a3d2e with ModelFormFieldTest removed.
2020-02-25 13:52:27 +00:00
Pawan Verma c5e640dc99 Fixed: Issue in which Agreement Item can't be removed from Agreement
(OFBIZ-11410)

Reason for the issue was incorrect use of service IN parameters for entity-auto delete invoke.

Thanks, Pierre Smits for the report.
2020-02-24 19:05:38 +05:30
Jacques Le Roux a0495b344e Fixed: Improve ObjectInputStream class (CVE-2019-0189)
Improved: no functional change
(OFBIZ-10837) (OFBIZ-11398)

I missed to update refactored UtilObject class
2020-02-24 12:50:15 +01:00
Jacques Le Roux e78cc49d71 Fixed: Improve ObjectInputStream class (CVE-2019-0189)
Improved: no functional change
(OFBIZ-10837) (OFBIZ-11398)

Steps to generate:
1. Navigate to - catalog/control/EditProdCatalog?prodCatalogId=TestCatalog
2. Click on - CREATE SEO CATEGORY/PRODUCTS
3. The broken page will be displayed

The issue is due to the use of a GString in
createMissingCategoryAndProductAltUrls().

This:
    result.successMessageList = [
        "Categories updated: ${categoriesUpdated}",
        "Products updated: ${productsUpdated}"

As it's common to use such expressions I have added the necessary
org.codehaus.groovy.runtime.GStringImpl groovy.lang.GString
to the white list of classes in listOfSafeObjectsForInputStream in
SafeObjectInputStream.properties

I finally have also decided to use this property as default and commented for
committers to be aware that it should be also put in DEFAULT_WHITELIST_PATTERN
in SafeObjectInputStream class. Because if, for a reason,
listOfSafeObjectsForInputStream is empty OFBiz will still be protected

Thanks: Dikpal Kanungo for reporting

# Conflicts:
# SafeObjectInputStream.java
Handled by hand
2020-02-24 11:37:07 +01:00
Michael Brohl f1fba85637 Provide a FileItem entry in UtilHttp.getMultiPartParameterMap.
(OFBIZ-11346)
2020-02-22 11:57:25 +01:00
Suraj Khurana b16fc9baf5 Fixed: Product Price set based on 'Purchase Price Agreement' isn't honoured while same is used during ordering.
(OFBIZ-7610)

Thanks Ankush Upadhyay for the patch and Swapnil Shah for reporting the ticket.
2020-02-22 14:39:45 +05:30
Jacques Le Roux e78b29fe14 Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 09:43:08 +01:00
akash 50ba0d93e9 Fixed: Issue while redirecting to Request Detail Screen from View Communication Event
(OFBIZ-9658)

Thanks, Ankit Joshi for your contribution.
2020-02-22 13:32:01 +05:30
Deepak Dixit 5643c442e4 Added missing GeoAssoc data for Ladakh geo
(OFBIZ-11399)
2020-02-22 13:04:13 +05:30
Deepak Dixit 4d07b12b2a Update India Geo information according to ISO notifications 2019-11-22
(OFBIZ-11399)

Change of subdivision category from state to Union territory for IN-JK; Addition of Union territory IN-LA;
2020-02-22 12:56:59 +05:30
Suraj Khurana d097d8ddba Fixed: UserLoginPasswordHistory is not maintaining password as present in UserLogin.
(OFBIZ-10802)
Thanks Rohit Koushal for the patch. Thanks Jacques Le Roux and Gil Portenseigne for the review.
2020-02-22 12:50:54 +05:30
Jacques Le Roux d916b92ec3 Fixed: replaceFirst sensible to variable pattern
(OFBIZ-11396)

When using variable pattern with replaceFirst you may cross issues if the
pattern contains specific tokens. For instance on Windows with the path
"C:\projectsASF\Git\ofbiz-framework/" you have inside the token "\p" which has
a special meaning.
2020-02-22 07:23:39 +01:00
Jacques Le Roux 44edd194ee Fixed: The "stream" request-map in ecommerce and commonext controllers
requires authentication
(OFBIZ-11349)

Thanks: Michael for reporting a possible issue when only commenting the "stream"
request-map in commonext controller. And Jacopo to suggest to require
authentication (after suggesting to comment out)

It should be also noted that when the CSRF defense implementation will be in
place, all XSS vulnerabilities w/o authentication will not longer be possible.
Because then all requests shall contains a CSRF token.
2020-02-19 13:49:20 +01:00
Jacques Le Roux fea0078fc3 Fixed: Temporarily comment out the "stream" request-map in commonext controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to require
(maybe only temporarily) the "stream" request-map in commonext controller
to need authentication.

We will later check that this has no impact and if necessary remove the
mandatory authentication, see OFBIZ-11349
2020-02-19 09:42:32 +01:00
Michael Brohl b8f727dc61 Fixed: CMS add content not working.
(OFBIZ-10833)

This fixes the mission content association and wrong update of the
parent content reported by Ingo Wolfmayr. Thanks Sebastian Berg for
providing the patch.
2020-02-18 21:29:53 +01:00
Michael Brohl 3704a9b1ee Fixed: Alternate KeyWord Thesaurus functionality does not work properly.
(OFBIZ-11291)

Thanks Pawan Verma for reporting and Wiebke Pätzold for providing the
patch.
2020-02-18 10:11:06 +01:00
Jacques Le Roux b874a11103 Fixed: Temporarily comment out the "stream" request-map in ecommerce controller
for security reason
(OFBIZ-11353)

A vulnerability has been reported to the OFBiz security team. To be able to
release the 17.12.01 version with this vulnerability fixed we need to
temporarily comment out the "stream" request-map in commonext controller.
We will later fix the specific issue to put back the functionalities allowed by
the "stream" request-map in this controller, see OFBIZ-11349
2020-02-14 10:19:31 +01:00
Gil Portenseigne 767e17d02d Improved: Error in user impersonation with sub permission
(OFBIZ-11342)

Improved javadoc
Set 'checkMultiLevelAdminPermissionValidity' visibility to default
Add another test verifying that hierarchy in permission is respected

Thanks Mathieu for your review
2020-02-13 15:32:39 +01:00
Gil Portenseigne 43bfbcf4f2 Fixed: Error in user impersonation with sub permission
(OFBIZ-11342)

Add unit tests for permission control feature.
Add new method to manage multilevel permission control.
This allowing an user with PARTYMGR_ADMIN permission to impersonate
another user with PARTYMGR_PCM_CREATE permission.
2020-02-12 09:55:41 +01:00
Michael Brohl de75e163fb Revert "Multi Part Input Parameters not Available in Groovy Event (OFBIZ-5048)"
This reverts commit 02d59bcd5b.
2020-02-11 21:50:49 +01:00
Michael Brohl 90faad2046 Revert "Improved: Remove unused services from party/services_view.xml and PartyServices.java/.xml. (OFBIZ-9988)"
This reverts commit 00a5d3413a.
2020-02-09 15:46:50 +01:00
Michael Brohl 91d136bb3e Fixed: Form widget field with input-method="time-dropdown" unable to
understand the default time.
(OFBIZ-11150)

Thanks Wiebke Pätzold for reporting and providing the patch.
2020-02-07 16:36:42 +01:00
Jacques Le Roux 77d6a5ff91 Fixed: Unable to continue to Step 3 in One Page Checkout
(OFBIZ-11318)

The following error is returned when trying to continue to Step3 when checking
out using One Page Checkout.

Could not create new purpose, a purpose with that type already exists.:
[GenericEntity:PartyContactWithPurpose][contactFromDate,2020-01-05 19:48:18.29
(java.sql.Timestamp)][contactMechId,10020(java.lang.String)]
[contactMechPurposeTypeId,SHIPPING_LOCATION(java.lang.String)]
[partyId,admin(java.lang.String)][purposeFromDate,2020-01-05 19:48:18.332
(java.sql.Timestamp)

It does not happen with DemoCustomer but at least with admin user

It was caused by OFBIZ-10588. I checked for similar issues and found that, in
unlike in createUpdateBillingAddress, in createUpdateShippingAddress and
createUpdateCreditCard partyId was used without a prior setting from
parameters.partyId

Thanks: James Young for proposing a solution. I rather fixed otherwise this and
another similar case in createUpdateCreditCard
2020-02-07 14:43:43 +01:00
akash 37b8e5b0e8 Fixed: Unnecessary ship groups in orders.
(OFBIZ-10489)

Thanks, Oleg Andreyev and Mohammad Kathawala for your contribution.
2020-02-07 18:46:53 +05:30
Nicolas Malin d0e2ebbb98 Fixed: Crashed Scheduled jobs are not getting rescheduled with temporal expression
(OFBIZ-11340)

When a OFBiz server are stopped or crashed with job on queued state,
at the start, they are restarted but without information on tempExprId and recurrenceInfoId

This causes a break for recurrence jobs to their planning

Thanks to Mohammed Rehan Khan for this issue and Scott Gray for the review.
2020-02-06 17:03:04 +01:00
Jacques Le Roux 91cdc817e1 Fixed: setUserTimeZone should ran only once based on error
(OFBIZ-11329)

This will be notably useful when committing CSRF solution as explained in
OFBIZ-11306:

SetTimeZoneFromBrowser when starting gives a  RequestHandlerException:
Invalid or missing CSRF token for AJAX call to path '/SetTimeZoneFromBrowser'.
Also not only when starting.

Thanks: James Yong for review
2020-02-05 09:32:42 +01:00
Jacques Le Roux 218d5a07a2 Fixed: impersonateLogin
(OFBIZ-5409)

I reopended this old issue because, while working on  OFBIZ-11329, I found that
userLogin and impersonateLogin should be removed from
jsonResponseFromRequestAttributes

Thanks: James Yong for pointing that out
2020-02-04 15:43:21 +01:00
Michael Brohl 31c2d7250d Improvement: German translation improvements in HumanResUiLabels
(OFBIZ-11134)

Thanks Ulrich Heidfeld for reporting and providing the patch.
2020-02-03 08:58:12 +01:00
Nicolas Malin 2342e0e8bc Improved: Improve error message page to support Theming
(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
2020-02-01 11:07:36 +01:00
Michael Brohl 02d59bcd5b Multi Part Input Parameters not Available in Groovy Event
(OFBIZ-5048)

This change provides easier access to the FileItem by not wrapping it
into a buffer.
2020-01-31 15:52:51 +01:00
Michael Brohl 5570986d6d Improved: ‘EntityOperator#getId()’ is not used in the framework
(OFBIZ-10607)

Thanks Mathieu Lirzin for reporting and providing the patch.
2020-01-30 20:58:15 +01:00
Michael Brohl 9d77738779 Fixed: German translation typo in PartyUiLabels
(OFBIZ-11308)

Thanks: Ingo Könemann for reporting and providing the patch.
2020-01-30 18:39:12 +01:00
Pawan Verma df64a3b31e Revert "Fixed: Potensial bug under CommunicationEventServices#updateCommEventAfterEmail for CommunicationEvent.subject field"
(OFBIZ-10879)

This reverts commit bbcc4692dc.
2020-01-29 12:59:09 +05:30
Jacques Le Roux 1b6b76b64f Fixed: Fixed the issue on party page that will upload the data each time after
refreshing the page.
(OFBIZ-11325)

Earlier 'view' response type is used on the request that cause the issue.
We need to use request-redirect response type along with the required
redirect-parameter instead of view response type, i.e. We need to
request-redirect on viewProfile along with partyId as redirect-parameter.

Thanks: Humera Khan
2020-01-26 06:19:41 +01:00
Pawan Verma bbcc4692dc Fixed: Potensial bug under CommunicationEventServices#updateCommEventAfterEmail for CommunicationEvent.subject field
(OFBIZ-10879)

CommunicationEventServices#updateCommEventAfterEmail could generate wrong result. If general.properties value 'mail.notifications.redirectTo' is used, it is possible that the subject string has more than 255 character.

Thanks, Ulrich Heidfeld for your contribution.
2020-01-25 15:55:27 +05:30
Pawan Verma b4862040bc Fixed: Same content uploaded twice, if refresh the page after uploading the content
(OFBIZ-11171)

Thanks, Humera Khan and Shubham Goswami for your contribution.
2020-01-25 13:10:08 +05:30
Pawan Verma 50d0069e84 Fixed: Order Status History section broken for anonymous order
(OFBIZ-11231)

Reason for the issue: Anonymous orders doen't have associated User login record, so shown statusUserLogin in that case.
2020-01-25 12:03:27 +05:30
Pawan Verma 6b327ca3e1 Fixed: updatePassword does not save optional parameter requirePasswordChange
(OFBIZ-11320)

When changing the password of a User Login through the Party Manager the Require Password Change dropdown menu selection does not save the selected value. The corresponding process is missing from the LoginMapProcs.xml.

Thanks: Ingo Könemann for your contribution.
2020-01-16 12:42:24 +05:30
Jacques Le Roux 23aa779df5 Fixed: Bug when order contains adjustments with NULL amount
(OFBIZ-11316)

The issue was introduced by OFBIZ-7012 where adding isTaxIncludedInPrice was
missing at line 565. Because the compared amount in this line (in the adjustment)
is different from 0 and equals to amountAlreadyIncluded only if
the tax is included in price

Thanks: Amine Azzi
2020-01-11 11:25:46 +01:00
Deepak Dixit 0b80fdd450 Fixed: Fix typo 2020-01-06 00:54:13 +05:30
Jacopo Cappellato 3823068c08 Fixed: Extend the thru date of the demo financial period (and simplify
some related demo data for easier future maintenance) in order to fix
some tests that are failing in the new year.
2020-01-03 17:36:36 +01:00
Jacques Le Roux 7ab1a82f54 Improved: Equivalent of svn:auto-props properties on the server
(OFBIZ-OFBIZ-11279)

This is needed as explained at https://s.apache.org/i86ht
2019-12-19 13:37:28 +01:00
Jacques Le Roux 8c8bc56cd3 Saving files before refreshing line endings 2019-12-19 13:34:54 +01:00
Jacques Le Roux 5b6aa81d82 Improved: Equivalent of svn:auto-props properties on the server
(OFBIZ-OFBIZ-11279)

We should have an equivalent of svn:auto-props properties on the server:
https://help.github.com/articles/dealing-with-line-endings/#per-repository-settings
2019-12-19 13:22:39 +01:00
Samuel Trégouët b52bef9bbb Fixed: Add XML declaration in “web.xml” files
(OFBIZ-6993)

These declarations avoid SAXParseException traceback when parsing web.xml
the first time in WebappUtil.parseWebXmlFile
2019-12-18 13:51:03 +01:00
Samuel Trégouët e93d8a5560 Fixed: Use ‘WebAppUtil#parseWebXmlFile’ when handling “web.xml” files
(OFBIZ-6993)

# Conflict handled by hand in:
#	framework/catalina/src/main/java/org/apache/ofbiz/catalina/container/CatalinaContainer.java
2019-12-18 13:50:44 +01:00
Mathieu Lirzin 8d978b2601 Fixed: Display file name in XML parsing errors
(OFBIZ-6993)
2019-12-18 11:35:25 +01:00
Pawan Verma d322a77b67 Fixed: Add button for 'Gift Message is shown on completed order
(OFBIZ-11160)

Thanks: Pierre Smits for report and Shivanand Chhatre for the fix.
2019-12-12 16:08:53 +05:30
Jacques Le Roux 40767e81f9 Fixed: https://github.com/apache/ofbiz-framework/pull/3
Just fixes a typo I guess people from Indonesia and Yogyakarta did not see
it yet, so I did not create a Jira
2019-12-01 12:37:35 +01:00
Mathieu Lirzin 79b6830147 Reverted: "Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)"
This reverts commit 3075027df7.
2019-11-28 09:48:43 +01:00
Samuel Trégouët 3075027df7 Fixed: add XML declaration in “web.xml” files (OFBIZ-6993)
these declarations avoid SAXParseException traceback when parsing web.xml
the first time in WebappUtil.parseWebXmlFile
2019-11-27 17:44:27 +01:00
Jacques Le Roux 7bef57652d Fixed: Number problem cancelling order item
(OFBIZ-11283)

If an order item has a quantity greater then 1000, cancelling the order item via
the order form in backend does not work.

In the Demo (trunk) environment: the quantity of 1200 to cancel is displayed as
"1,200" in the quantity input field.
--> an error is displayed

On my local installation I use a different locale and it is displayed as "1.200".
--> interprets the dot as a comma and the quantity of 1,2 is cancelled

Create Order: Order Mgt --> Order Entry --> Sales Order (Customer: DemoCustomer)
--> ProductId: GZ-2644, Quantity 1200 --> Finalize order
On order: Edit Items --> click checkbox next to quantity -->cancel selected items

jleroux: I have applied the same in ReceiveInventory.ftl

Thanks: Ingo Wolfmayr for report and test. Ankush Upadhyay for the fix
2019-11-25 10:33:15 +01:00
Pawan Verma 0a181c7c36 Fixed: liniting issues introduced by commit d00208c
(OFBIZ-10585)

Thanks: Mathieu Lirzin for report
2019-11-25 12:53:54 +05:30
Pawan Verma a42f03aa10 Fixed: Production run not created for marketing package auto type product if component inventory is not available
(OFBIZ-10585)

When we create an order for marketing package auto, the system checks the component inventory and if found then it creates the production run job and produce marketing package inventory, but if component quantity not available then it does not create the job. So if we don't have an inventory item of component then production run should be created with created status.

Thanks: Yashwant Dhakad for report and Ankush Upadhyay for the patch.
2019-11-23 12:17:00 +05:30
Pawan Verma 4502821830 Fixed: Error while CSR creates a return
(OFBIZ-11068)

Added check to validate Payment Method passed from UI while creating return. If not available in system, throw an error.

Thanks: Dikpal Kanungo for report and Rohit Hukkeri for the patch.
2019-11-23 11:12:25 +05:30
Nicolas Malin 58c221e47d Fixed: Usage of 'include-form' instead of 'include-grid' in PartyScreens.xml for grid elements
(OFBIZ-11286)

In PartyScreens.xml there were 'ListInvoicesApplPayments', 'ListUnAppliedInvoices' and 'ListUnAppliedPayments' include as form instead of grid but in PartyForms.xml they are defined as grids.

Thanks to Ulrich Heidfeld to raise and solve this issue
2019-11-22 15:33:01 +01:00
Jacques Le Roux 943f1cbcf2 Improved: no functional change
Fixes Wrong version name. Actually more to test INFRA-19443
"Trigger OFBiz Buildbot on commits"
2019-11-17 14:35:20 +01:00
Jacques Le Roux 5be9b76d33 Improved: no functional change
Fixes Wrong version name. Actually more to test INFRA-19443
"Trigger OFBiz Buildbot on commits"
2019-11-17 14:31:27 +01:00
Jacopo Cappellato bddf5147ca Fixed: Add missing view permissions checks to various screens. 2019-11-16 08:24:35 +01:00
Jacques Le Roux cab753894f Fixed: We have build problems in branches with plugins
(OFBIZ-11284)

Replaces trunk link by branch link
2019-11-15 17:16:21 +01:00
Nicolas Malin 5b4010f716 Fixed: Possible NPE in StringUtil#strToMap
(OFBIZ-11281)

StringUtil#strToMap(String, String, boolean, String) throws Nullpointer for StringUtil.strToMap("", false).

Thanks to Ulrich Heidfeld for this fix
2019-11-14 09:16:25 +01:00
Jacques Le Roux 59b1ba17fa Improved: SeoContextFilter.java is not able to handle query strings
(OFBIZ-11278)

Removes a trailing blank and uses empty to check request::getParameterMap result

Thanks: Mathieu to spot "empty to check request::getParameterMap result"
(cherry picked from commit 61ade2add5)
2019-11-10 10:48:04 +01:00
Jacques Le Roux 361c809d22 Fixed: SeoContextFilter.java is not able to handle query strings
(OFBIZ-11278)

While working on OFBIZ-9804 (verification email for Newsletter) I was confronted
with misc. issues. One of them was that SeoContextFilter.java was not handling
query strings.

This fixes it
2019-11-09 22:05:46 +01:00
Jacques Le Roux 1c27d21260 Fixed: Getting policy error while editing html text data using cms
(OFBIZ-11265)

Service parameter with allow-html="safe" does not check the OWASP sanitizer flag
ie. enabled or not and perform sanitization which causing policy error while
editing text data

getting following exception error:
"In field [textData] by our input policy, your input has not been accepted for
security reason. Please check and modify accordingly, thanks."

Thanks: Pradeep Choudhary for report and suggestion
(cherry picked from commit 8aea160e04)
2019-11-07 15:48:15 +01:00
Jacques Le Roux f062329810 Fixed: Update the SvnCheckout Gradle task to used Github svn repo
(OFBIZ-11276)

Relies on a Github specific feature which allows to use and automated
mirrored svn repo.
2019-11-06 19:06:05 +01:00
Jacques Le Roux a90ccd62a0 Fixed: baseEcommerceSecureUrl does not work in ecomseo.
(OFBIZ-11267)

This fixes it by introducing a new pattern in SeoConfig.xml
2019-11-04 16:04:31 +01:00
Jacques Le Roux baf537e3ac Fixed: baseEcommerceSecureUrl does not work in ecomseo.
(OFBIZ-11267)

This fixes it by introducing a new pattern in SeoConfig.xml

(cherry picked from commit 8f4cfeb951)
2019-11-04 15:52:56 +01:00
Jacques Le Roux bccdb8b4a3 Fixed: SOAPService does not work
(OFBIZ-11259)

This was broken by r1839451 committed at the bottom of OFBIZ-10438
A simple fix is to allow "webtools/control/SOAPService/serviceName?WSDL" scheme. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1869155 13f79535-47bb-0310-9956-ffa450edef68
2019-10-30 09:41:14 +00:00
Mathieu Lirzin a974256781 Fixed: Handle whitelist of serializable classes from properties
(OFBIZ-11261)

There was a bug regarding the way the ‘ListOfSafeObjectsForInputStream’ value
defined in the “SafeObjectInputStream.properties” file was handled.  Mistakenly
only one class identifier was allowed.

The tests have not been backported from ‘trunk’ because of the way
‘UtilProperties#setPropertyValueInMemory’ work in 18.12.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1869003 13f79535-47bb-0310-9956-ffa450edef68
2019-10-26 14:54:20 +00:00
Gil Portenseigne e6021be638 Fixed: Update release revision number into embedded documentation
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868932 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 13:35:05 +00:00
Aditya Sharma 17bdee9397 Applied fix from trunk for revision: 1868911
===

Improved: Activate / Finish EmplPositionType ValidResponsibilities
(OFBIZ-11045)
Most of code / form / screen already exist to manage EmpPositionType, except

1. menu item
2. screen menu fields
Fixed  wrong entity name in the entityCondition prepared in ListValidResponsibilities form

Thanks Olivier Heintz for reporting and providing the patch


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868912 13f79535-47bb-0310-9956-ffa450edef68
2019-10-25 08:53:01 +00:00
Aditya Sharma fa58710513 Applied fix from trunk for revision: 1868738
===

Improved: User should be notified with success message on creating shopping list in ecommerce component
(OFBIZ-9522)
On performing any action, user should be notified with the success message if the action has been performed successfully.

Thanks Chandrashekhar Dhakad for the patch


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868739 13f79535-47bb-0310-9956-ffa450edef68
2019-10-22 07:33:44 +00:00
Mathieu Lirzin 5476629453 Fixed: Use ‘ConcurrentHashMap’ to avoid ‘ConcurrentModificationException’
(OFBIZ-11258)

When trying to load components in their dependency order the
‘toBeLoadedComponents’ map is modified while being iterated over which
is not safe for non-concurrent maps.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868666 13f79535-47bb-0310-9956-ffa450edef68
2019-10-20 16:51:09 +00:00
Mathieu Lirzin 1660bd374f Fixed: Make ‘javadoc’ build work with recent Java
(OFBIZ-11257)

With a recent OpenJDK release we had the following error

```
> Task :javadoc
javadoc: error - The code being documented uses modules but the packages defined in https://docs.oracle.com/javase/8/docs/api/ are in the unnamed module.
javadoc: error - The code being documented uses modules but the
packages defined in https://docs.oracle.com/javaee/7/api/ are in the
unnamed module.
[...]
2 errors
100 warnings

> Task :javadoc FAILED
```

With ‘javadoc --source 8’ this error disappears as described in
JDK-8212233 [1].

[1] https://bugs.openjdk.java.net/browse/JDK-8212233


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868624 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 13:40:52 +00:00
Mathieu Lirzin f26ae54727 Fixed: Adapt some javadoc to let the build succeed
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868623 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 13:37:37 +00:00
Jacques Le Roux 772f9ba54f "Applied fix from trunk for revision: 1868615"
------------------------------------------------------------------------
r1868615 | jleroux | 2019-10-19 10:12:07 +0200 (sam. 19 oct. 2019) | 6 lignes

Fixed: Fix multi modal opening
(OFBIZ-11211)

Simplifies a little bit the current code.

Thanks: Leila for patch and Carl for confirmation
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868616 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 08:12:56 +00:00
Jacques Le Roux 87053aa275 "Applied fix from trunk for revision: 1868611"
------------------------------------------------------------------------
r1868611 | jleroux | 2019-10-19 08:42:07 +0200 (sam. 19 oct. 2019) | 11 lignes

Improved: Handling tenant in XmlRpcEventHandler
(OFBIZ-10284)

The XMLRPC service does not support tenants. Even if the tenant domain is 
included in the HTTP request the call does not affect the correct tenant. 
The issue and fix has been discussed in  in the thread
https://markmail.org/message/bz4dofrxqp6i7ove

jleroux: I was able to port the R16 patch provided by Rajesh to the trunk. 

Thanks: Rajesh Kumar Mallah
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868612 13f79535-47bb-0310-9956-ffa450edef68
2019-10-19 06:58:01 +00:00
Jacques Le Roux 06a3b85fea "Applied fix from trunk for revision: 1868553"
------------------------------------------------------------------------
r1868553 | jleroux | 2019-10-17 16:26:42 +0200 (jeu. 17 oct. 2019) | 14 lignes

Fixed: FTL error for purchase order with Bulk Item Type
(OFBIZ-11252)

Steps to regenerate:
1. Login into the ordermgr application and click on Order Entry tab
2. Create PO with any supplier
3. Fill details and click on Continue
4. Now select Product Category with Item type Bulk and add the description and 
   Click on add to order
5.  Finalize order with Finalize Order button
6. Add Term type, ship group option, etc details and create Order.
7. Scroll down to Order Items section and See the FTL error on the screen.

Thanks: Devanshu Vyas
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868554 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 14:27:31 +00:00
Jacques Le Roux 207b297c67 "Applied fix from trunk for revision: 1868545"
------------------------------------------------------------------------
r1868545 | jleroux | 2019-10-17 14:19:33 +0200 (jeu. 17 oct. 2019) | 16 lignes

Fixed: EditExample always update status, because current Status not shown
(OFBIZ-11230)

In the EditExample Form, the drop-down is populates with the Valid change status 
only. So current status is not in the list and the status print in the drop-down 
is the next authorized. I want to modify exampleName or exampleType, I go to 
editExample and change what I want and validate. The problem is status is also 
changed!

There are 12 other same or similar cases. For the first of them (in FinAccount) 
there is the same bug: when I change FinAccount Name, status change too. If I 
add current="first-in-list" in the tag drop-down it works 

jleroux: Quote is a peculiar case due to OFBIZ-7337 which was a wrong fix
 
Thanks: Oliver for the analysis and the fix 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868546 13f79535-47bb-0310-9956-ffa450edef68
2019-10-17 12:20:10 +00:00
Jacques Le Roux 3b83b49d37 Improved: no functional change
Just better English in message

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868424 13f79535-47bb-0310-9956-ffa450edef68
2019-10-14 07:20:56 +00:00
Jacques Le Roux 2226d17e5a "Applied fix from trunk for revision: 1868395"
------------------------------------------------------------------------
r1868395 | jleroux | 2019-10-13 12:37:08 +0200 (dim. 13 oct. 2019) | 8 lignes

Fixed: Merge UrlRegexpTransform and OfbizUrlTransform classes
(OFBIZ-11229)

OFBIZ-4361 depends on this issue. Here is a first version, the main identified 
point was when the request isn't present (email send, service call) the website 
isn't pull from context. This solves this aspect

Thanks: Nicolas for the patch
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868396 13f79535-47bb-0310-9956-ffa450edef68
2019-10-13 10:38:26 +00:00
Jacques Le Roux 4aa66bf2aa "Applied fix from trunk for revision: 1868298"
------------------------------------------------------------------------
r1868298 | jleroux | 2019-10-11 18:45:16 +0200 (ven. 11 oct. 2019) | 20 lignes

Fixed: NotSerializableException after uploading images to an order
(OFBIZ-11123)

I found that using in r1866259 the same fix than Si Chen used in OFBIZ-750 was 
wrong. The code just above this fix is

{code:java}
if (obj instanceof Serializable) {
    reqAttrMap.put(name, obj);
}
{code}

The problem with this code is that if does not handle inner Maps which may 
contain a non Serializable Object. So the solution is rather to get one level
deeper and apply the same. We can then remove the harcoded lines with 
"uploadedFile" and "_REQUEST_HANDLER_" below. Then all possible cases are handled
as long as we have not inner-inner-Maps



------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1868299 13f79535-47bb-0310-9956-ffa450edef68
2019-10-11 16:45:56 +00:00
Jacques Le Roux 6761609754 "Applied fix from trunk for revision: 1867998"
------------------------------------------------------------------------
r1867998 | jleroux | 2019-10-05 10:05:54 +0200 (sam. 05 oct. 2019) | 8 lignes

Improved: no functional change

As reported by Ethan Vos on user ML, sometimes the alias between wget and 
Invoke-WebRequest is not present on Windows 7, better keep it simple!

Also removes the comment:
  Anyway I believe this should be only used in dev environment
which is no longer true
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867999 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 08:06:52 +00:00
Pawan Verma 40773caeb9 Applied fix from trunk for revision: 1867972
===

Reverted: User is unable to update the review of product
(OFBIZ-10799)

Reverted rev 1867904

Thanks: Deepak Dixit for reporting the issue.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867973 13f79535-47bb-0310-9956-ffa450edef68
2019-10-04 10:16:06 +00:00
Nicolas Malin 19339021e0 Improved: Use website to generate links on email content
(OFBIZ-4361)
OFBiz contains a nice process to generate link through WebSite entity.
Unfortunately when you send an email, the standard service didn't propage the website 
to the body content email, so we can't use it.

This improvement is needed on forgot password process to resolve the correct uri 
and go back on good OFBiz component: where the user requested for a new password.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867961 13f79535-47bb-0310-9956-ffa450edef68
2019-10-04 07:33:05 +00:00
Pawan Verma 5d80f05238 Applied fix from trunk for revision: 1867937
===

'At least one phone number is required below' message should be uneditable while creating new customer using partymgr
(OFBIZ-11113)

Thanks: Arpit Mor for report and Saurabh Dixit for the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867938 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 12:37:40 +00:00
Pawan Verma 059ca18be6 Applied fix from trunk for revision: 1867930
===

Fixed: Check run payment(A/P) transactions not getting available for reconciliation
(OFBIZ-10796)

Check run payment group transactions don't get available for Financial Account reconciliation. Though the financial account balance gets updated during the A/P check run process, the system must allow the user with an additional step of reconciling the transactions.

The cause of this is that the financial account transaction doesn't get created in the 'Created' status and has an 'Approved' status. An approved status financial transaction directly updates the financial account balance and thus don't appear in the list of the transactions to be reconciled.

Thanks: Chinmay Patidar for your contribution and Pierre Smits for the review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867931 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 12:06:29 +00:00
Pawan Verma f36af52623 Applied fix from trunk for revision: 1867910
===

Fixed: Sales By Store Report not working
(OFBIZ-11119)

Added Null check to avoid Exception.

Thanks: Chandan Khandelwal for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867911 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 07:35:09 +00:00
Pawan Verma ea97150d8d Applied fix from trunk for revision: 1867904
===

Fixed: User is unable to update the review of product
(OFBIZ-10799)

Redirected request with eligible parameters so that If the user had a search using any parameter result should persist after the update.

Thanks: Ashish Sharma for report and Pierre Smits and Jacques Le Roux for the review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867905 13f79535-47bb-0310-9956-ffa450edef68
2019-10-03 07:22:43 +00:00
Suraj Khurana cb1fd39d8e Applied fix from trunk for revision: 1867879
===

Improved: Added backward compatibility for inputParamEnumId in promotion management.
(OFBIZ-11105)
Thanks: Lalit Dashora for reporting and providing the patch, Jacques Le Roux for review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867880 13f79535-47bb-0310-9956-ffa450edef68
2019-10-02 10:13:09 +00:00
Aditya Sharma 26763711e0 Applied fix from trunk for revision: 1867745
===

Fixed: redundant license text


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867746 13f79535-47bb-0310-9956-ffa450edef68
2019-09-30 06:49:24 +00:00
Jacques Le Roux 868bc2dce9 "Applied fix from trunk for revision: 1867585"
------------------------------------------------------------------------
r1867585 | jleroux | 2019-09-26 17:38:52 +0200 (jeu. 26 sept. 2019) | 9 lignes

Fixed: Error in log when looking for parties at partymgr/control/main
(OFBIZ-11201)

These are similar issues in Minilang than the one fixed initially for
<set field="userLoginSize" value="${util:size(logins)}" type="Integer"/>
Fixed by replacing by 
<set field="userLoginSize" value="${groovy:logins.size()}"/>


------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867586 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 15:39:52 +00:00
Nicolas Malin 3ba95ef2ae Fixed: Default option for ModelFormField.DateFindField doesn't work
(OFBIZ-11212)
When you use a date-find element on form, the defaut option are in code like to greater_than and less _than

        public DateFindField(int fieldSource, String type) {
            super(fieldSource, type);
            this.defaultOptionFrom = greaterThanEqualTo;
            this.defaultOptionThru = lessThanEqualTo;
        }

but on macro

<#macro renderDateFindField ...
      <option value=greaterThan<#if defaultOptionFrom==greaterThan> selected=selected</#if>></option><#rt/>
      ...
      <option value=opLessThan<#if defaultOptionThru==opLessThan> selected=selected</#if>></option><#rt/>
      ...
</#macro>

So the value java isn't correct with ftl values and default value never used.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867583 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 15:31:46 +00:00
Jacques Le Roux c29deddb4f "Applied fix from trunk for revision: 1867577"
------------------------------------------------------------------------
r1867577 | jleroux | 2019-09-26 16:41:50 +0200 (jeu. 26 sept. 2019) | 8 lignes

Fixed: Fix multi modal opening
(OFBIZ-11211)

The issue is that when closing the modal the div inside html dom is not removed. 
Then opening a second time create another identical div. Since a lookup is based 
on an unique id, this id is no more unique...

Thanks: Carl Demus
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867578 13f79535-47bb-0310-9956-ffa450edef68
2019-09-26 14:42:41 +00:00
Nicolas Malin 35529819ce Fixed: Send upload form with even-update-area doesn't work
(OFBIZ-11207)
When you create a xml form with upload as type, you can't use on-event-update-area element to submit it by ajax.
Otherwise, OFBiz return an error message on 'uploadFile is empty.
To solve it, we analyze the enctype's form before submit it to move on FormData instead a direct serialize [1]

example form where the problem has been present
****
    <form name='AddNicelyFile' type='upload' target='CreateNicelyFile'>
        <field name='uploadedFile' title='File'><file/></field>
        <field name='addButton'><submit/></field>
        <on-event-update-area event-type='submit' area-id='window' area-target='FileDisplaying'/>
    </form>
****

Thanks to Samuel Tregouet for this fix

[1] https://developer.mozilla.org/en-US/docs/Web/API/FormData/Using_FormData_Objects

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867437 13f79535-47bb-0310-9956-ffa450edef68
2019-09-24 08:54:51 +00:00
Nicolas Malin 4406d24877 Fixed: Any ecommerce user has the ability to reset anothers password
(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
2019-09-21 19:12:23 +00:00
Jacques Le Roux 2ba21eb70a "Applied fix from trunk for revision: 1867099"
------------------------------------------------------------------------
r1867099 | jleroux | 2019-09-18 09:29:18 +0200 (mer. 18 sept. 2019) | 17 lignes

Fixed: Error in log when looking for parties at partymgr/control/main
(OFBIZ-11201)

There is this a (long stack trace) error in log (only), mostly

java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map
at org.apache.ofbiz.base.util.string.UelFunctions.getSize(UelFunctions.java:318)

I did not notice any other effect, so the fix only cleans the log.

It's actually an issue in ListParty grid with this line:
<set field="userLoginSize" value="${util:size(logins)}" type="Integer"/>

This fixes it by replacing by 
<set field="userLoginSize" value="${groovy:logins.size()}"/>


------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867100 13f79535-47bb-0310-9956-ffa450edef68
2019-09-18 07:30:03 +00:00
Jacques Le Roux 94e1e2ccfe "Applied fix from trunk for revision: 1867038"
------------------------------------------------------------------------
r1867038 | jleroux | 2019-09-17 08:32:20 +0200 (mar. 17 sept. 2019) | 11 lignes

Documented: 
Got this error with Eclipse Asciidoctor editor plugin

>> rendering:-273312131_hidden-editorfile_developer-manual.adoc
asciidoctor: WARNING: C:/projectsASF/ofbiz/framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc: line 473: unterminated listing block
asciidoctor: WARNING: C:/projectsASF/ofbiz/framework/minilang/docs/asciidoc/minilang-to-groovy-manual.adoc: line 511: unterminated listing block

This fixes it



------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1867039 13f79535-47bb-0310-9956-ffa450edef68
2019-09-17 06:34:20 +00:00
Jacques Le Roux 4b2db718f9 "Applied fix from trunk for revision: 1866986"
------------------------------------------------------------------------
r1866986 | jleroux | 2019-09-16 10:20:46 +0200 (lun. 16 sept. 2019) | 4 lignes

Fixed: Path Traversal in webtools/control/FetchLogs and ViewFile
(OFBIZ-11196)

Fixes a typo which was crashing webtools/control/LogView
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866987 13f79535-47bb-0310-9956-ffa450edef68
2019-09-16 08:21:34 +00:00
Jacques Le Roux 83c71d208b Improved: Document how to store the JWT secret key
(OFBIZ-10751)

Copy manually all files from trunk because of weird conflicts

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866938 13f79535-47bb-0310-9956-ffa450edef68
2019-09-14 11:37:37 +00:00
Jacques Le Roux 62b4b36d88 "Applied fix from trunk for revision: 1866920"
------------------------------------------------------------------------
r1866920 | jleroux | 2019-09-14 10:19:18 +0200 (sam. 14 sept. 2019) | 18 lignes

Fixed: Path Traversal in webtools/control/FetchLogs and ViewFile
(OFBIZ-11196)

These are not really path traversal issues. 

We can't solve them using the traditional way to fix path traversal issues 
(ie normalising path). Because Fetchlogs and ViewFile are actually reading 
files and if you have the right to read these files then nothing will prevent 
you to read them. 

The problem is more what those requests are supposed to do. 
Fetchlogs is supposed to read a log in the log dir 
and ViewFile is supposed to read a file containing labels 
(ie either an XML or Properties file).

So the solution is to allow these requests to only do what they are supposed to 
do. This is what is done in ViewFile and FetLogs Groovy files.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866921 13f79535-47bb-0310-9956-ffa450edef68
2019-09-14 08:21:21 +00:00
Jacques Le Roux c9cf9aec87 "Applied fix from trunk for revision: 1866890"
------------------------------------------------------------------------
r1866890 | jleroux | 2019-09-13 12:15:03 +0200 (ven. 13 sept. 2019) | 8 lignes

Improved: FindArInvoices request needs performance improvement regarding use of 
EntityListIterator::hasNext method
(OFBIZ-11198)

FindAPInvoices request  does not suffer from this issue nor findInvoice request.

This was due to <screen name="FindArInvoices"> definition
Using something similar than <screen name="FindApInvoices"> fixes the issue
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866891 13f79535-47bb-0310-9956-ffa450edef68
2019-09-13 10:16:15 +00:00
Jacques Le Roux 1494beb6f0 "Applied fix from trunk for revision: 1866834"
------------------------------------------------------------------------
r1866834 | jleroux | 2019-09-12 09:49:41 +0200 (jeu. 12 sept. 2019) | 8 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

Allows users to easily override the list of accepted objects by using the
listOfSafeObjectsForInputStream property

CVE-2019-0189

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866835 13f79535-47bb-0310-9956-ffa450edef68
2019-09-12 07:50:54 +00:00
Jacques Le Roux 6ad4622dc4 "Applied fix from trunk for revision: 1865852"
------------------------------------------------------------------------
r1865852 | pawan | 2019-08-24 16:28:57 +0200 (sam. 24 août 2019) | 8 lignes

Fixed: Issue of unable to view a PartyContent on view profile page of a party
(OFBIZ-11038)

When click on view button img request will be hit along with contentName and imgId as a parameter. This request invokes serveImage event(DataEvents.java) which is deprecated now.
Instead of img request we can call stream request with contentId as a parameter that invokes serveObjectData event.
This will work as per the value of content-disposition-type (requestHandler.properties) i.e. attachement or inline

Thanks: Devanshu Vyas for reporting the issue and Humera Khan for the patch and Prachi Shastri for testing of the bug.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866593 13f79535-47bb-0310-9956-ffa450edef68
2019-09-08 07:58:41 +00:00
Gil Portenseigne ddc1ccaf0d Fix parenthesis syntax error in groovy
(OFBIZ-11186)

Thanks Samuel Trégouët for your contribution

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866515 13f79535-47bb-0310-9956-ffa450edef68
2019-09-06 15:03:14 +00:00
Nicolas Malin 7bc3ac4f87 Implemented: Add a mechanism to prevent the usage of EntitySyncRemove
(OFBIZ-10008)

Complete the previous commit on revision 1835296 [1] to add mechanism to prevent
 the usage of EntitySyncRemove also on function Delegator.removeByPrimaryKey

[1] https://svn.apache.org/viewvc?view=revision&revision=1835296

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866479 13f79535-47bb-0310-9956-ffa450edef68
2019-09-05 16:46:20 +00:00
Jacques Le Roux 87064f2358 "Applied fix from trunk for revision: 1866259"
------------------------------------------------------------------------
r1866259 | jleroux | 2019-09-02 09:32:48 +0200 (lun. 02 sept. 2019) | 10 lignes

Fixed: NotSerializableException after uploading images to an order
(OFBIZ-11123)

In a lot of services we use the ByteBuffer object to upload files. 
When a such service is used with the redirect-parameter in a controller the 
ByteBuffer needs to be serialized. Unfortunately ByteBuffer (in our case its
subclass HeapByteBuffer) is not serializable. So that can't work.

Fortunately no redirect-parameter concerns uploadedFile so we can safely remove
it from reqAttrMap in RequestHandler
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866260 13f79535-47bb-0310-9956-ffa450edef68
2019-09-02 07:34:01 +00:00
Nicolas Malin b8004dc736 Improved: update init-gradle-wrapper.sh to load gradlew script
(OFBIZ-10145)
When you run 'sh gradle/init-gradle-wrapper.sh', if the script gradlew at the OFBiz root isn't present we download it from bintray.
Improvements to comments and messages in the init-gradle-wrapper.sh script do on r1865605 by Jacopo

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866123 13f79535-47bb-0310-9956-ffa450edef68
2019-08-30 07:15:28 +00:00
Nicolas Malin 7b2b70e9f3 Improved: Backport Find order screen can't make a search without ship to country
(OFBIZ-11176)
When you search orders on the standard screen [1] you can't unselect a country.
The problem come from the populate country list by countries.ftl who select by default a country without possibility to escape it.
We added a possibility to escape it through variable doNotPreselectDefaultCountryGeoId 

[1] https://localhost:8443/ordermgr/control/findorders

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1866013 13f79535-47bb-0310-9956-ffa450edef68
2019-08-27 21:32:41 +00:00
Jacques Le Roux 208a9c3967 "Applied fix from trunk for revision: 1865924 "
------------------------------------------------------------------------
r1865924 | nmalin | 2019-08-26 11:54:55 +0200 (lun. 26 août 2019) | 6 lignes

Fixed: CategoryServices returns null when opening Product main page
(OFBIZ-11175)
Increase parsing control to don't realize it on null value for viewSizeString
when call service getProductCategoryAndLimitedMembers.

Thanks Jacques Leroux for raise this issue
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865927 13f79535-47bb-0310-9956-ffa450edef68
2019-08-26 11:27:09 +00:00
Jacques Le Roux 311168d5cb "Applied fix from trunk for revision: 1865891"
------------------------------------------------------------------------
r1865891 | jleroux | 2019-08-25 15:24:10 +0200 (dim. 25 août 2019) | 5 lignes

Improved: Use Labels in themes names
(OFBIZ-9863)

Remove duplicated block that I forgot to remove
This had no effects but I found an XML error in log
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865892 13f79535-47bb-0310-9956-ffa450edef68
2019-08-25 13:27:32 +00:00
Jacques Le Roux fcf00e10ed "Applied fix from trunk for revision: 1865883"
------------------------------------------------------------------------
r1865883 | jleroux | 2019-08-25 11:48:31 +0200 (dim. 25 août 2019) | 8 lignes

Fixed: UiLabel is missing for Web Analytics Type on content  component
(OFBIZ-11170)

Steps to reproduce
content/control/EditWebAnalyticsConfig?webSiteId=WebStoreClone
On that Web Analytics Type UiLabel is missing.

Thanks: Rahul Marjiwe
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865884 13f79535-47bb-0310-9956-ffa450edef68
2019-08-25 09:49:18 +00:00
Pawan Verma 0128dbd809 Applied fix from trunk for revision: 1865820
===

Fixed: Issue in creating promotion action
(OFBIZ-11058)
Reason for this issue is a duplicate parameter with name customMethodId, We have dropdown and hidden field for the same parameter, this converts customMethodId value to a list.
Thanks: Lalit Dashora for reporting the issue.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865821 13f79535-47bb-0310-9956-ffa450edef68
2019-08-24 08:08:57 +00:00
Pawan Verma 83e254a363 Applied fix from trunk for revision: 1865811
===

Fixed: Order status history should show party id instead of user login id
(OFBIZ-11121)
Thanks: Ashish Kumar Pandey for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865813 13f79535-47bb-0310-9956-ffa450edef68
2019-08-24 05:17:05 +00:00
Jacques Le Roux 21fce619a3 Implemented: Remove the Gradle wrapper from our release packages and add a step
to our build notes
(OFBIZ-10145)

Removes weird characters

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865397 13f79535-47bb-0310-9956-ffa450edef68
2019-08-18 15:12:00 +00:00
Jacques Le Roux 55ce9f9e08 "Applied fix from trunk for revision: 1865370"
------------------------------------------------------------------------
r1865370 | jleroux | 2019-08-17 20:26:42 +0200 (sam. 17 août 2019) | 7 lignes

Improved: Use Labels in themes names
(OFBIZ-9863)

Adds labels and necessary calls in Theme.xml

While at it, improves other backend themes labels by removing redundancy, at 
least in French and English.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865371 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 18:27:19 +00:00
Jacques Le Roux e4722a8523 "Applied fix from trunk for revision: 1865367"
------------------------------------------------------------------------
r1865367 | jleroux | 2019-08-17 20:08:14 +0200 (sam. 17 août 2019) | 4 lignes

Fixed: <description> of <visual-theme> in Theme.xml does not work
(OFBIZ-9867)

There is no str:label in UelFunctions class but util:label
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865368 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 18:08:53 +00:00
Jacques Le Roux cedd7a3441 "Applied fix from trunk for revision: 1865347"
------------------------------------------------------------------------
r1865347 | jleroux | 2019-08-17 13:34:01 +0200 (sam. 17 août 2019) | 9 lignes

Fixed: Issue loading solr component (JNDI timeout)
(OFBIZ-11156)

We need to provide a JNDI environment property for Solr to load faster

Fixes previous commit where I hastily harcoded in jndi.properties file

Used a system property which can be used to define a JNDI environment 
property
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865348 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 11:34:59 +00:00
Jacques Le Roux 7172a46bb9 "Applied fix from trunk for revision: 1865344"
------------------------------------------------------------------------
r1865344 | jleroux | 2019-08-17 13:07:01 +0200 (sam. 17 août 2019) | 4 lignes

Fixed: Issue loading solr component (JNDI timeout)
(OFBIZ-11156)

We need to provide a JNDI environment Property for Solr to load faster
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865345 13f79535-47bb-0310-9956-ffa450edef68
2019-08-17 11:07:37 +00:00
Aditya Sharma 573a448ac3 Applied fix from trunk for revision: 1865103
===

Improved: Change the uggly favicon with the new one ! | Using new OFBiz logo
(OFBIZ-10522)
Fixed issues with logo size for flatgrey theme with some custom css to fix its height and width
Replaced old logo with the new one in tomahawk theme along with some custom css to fix its height and width


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1865104 13f79535-47bb-0310-9956-ffa450edef68
2019-08-14 09:49:29 +00:00
Jacques Le Roux ff12b7afd3 "Applied fix from trunk for revision: 1864930"
------------------------------------------------------------------------
r1864930 | jleroux | 2019-08-11 15:23:19 +0200 (dim. 11 août 2019) | 4 lignes

Fixed: [FB] Find Security Bugs
(OFBIZ-9973)

As suggested by Mathieu on dev ML factorises the use of Path::normalize
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864931 13f79535-47bb-0310-9956-ffa450edef68
2019-08-11 13:28:18 +00:00
Jacques Le Roux 5849e5c983 Implemented: Remove the Gradle wrapper from our release packages and add a step
to our build notes
(OFBIZ-10145)

Adds the Windows init-gradle-wrapper scripts (both .bat et .ps1) in all 
concerned branch (trunk, R18, R17)

These are very simple because I believe (almost?) nobody is using a Windows 
server to deploy OFBiz in production. So they will be only used in development 
environment. In case deployment in production is needed they supply a base to 
work on...

The init-gradle-wrapper.ps1 scripts use only HTTP and not HTTPS because it's 
very difficult to handle all the issues related with different versions of 
Powershell and .net in different versions of Windows. Better to let that to
deployment in case it's really needed...

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864927 13f79535-47bb-0310-9956-ffa450edef68
2019-08-11 12:56:38 +00:00
Jacques Le Roux c7e135bd60 Reverted: Remove the Gradle wrapper from our release packages and add a step
to our build notes
(OFBIZ-10145)

As explained in https://github.com/gradle/gradle/issues/2852 we shouldn't/don't 
need to put an ASL2 header in Gradle wrapper files

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864926 13f79535-47bb-0310-9956-ffa450edef68
2019-08-11 12:38:12 +00:00
Jacques Le Roux a44563f760 "Applied fix from trunk for revision: 1864891"
------------------------------------------------------------------------
r1864891 | jleroux | 2019-08-10 19:02:12 +0200 (sam. 10 août 2019) | 6 lignes

Fixed: In Product Image Management Uploading file fails due to missing 
StatusValidChange
(OFBIZ-11148)

With last commit I introduced a dependency from ProductSeedData to 
ContentSeedData. The loadAll tasks failed because of that, this fixes it.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864892 13f79535-47bb-0310-9956-ffa450edef68
2019-08-10 17:22:52 +00:00
Jacques Le Roux 956c52a818 "Applied fix from trunk for revision: 1864881"
------------------------------------------------------------------------
r1864881 | jleroux | 2019-08-10 17:51:19 +0200 (sam. 10 août 2019) | 7 lignes

Fixed: [FB] Find Security Bugs
(OFBIZ-9973)

This fixes an issue in FrameImage::uploadFrame which was reported by Man Yue Mo
as described in OFBIZ-9973

I finally decided to follow OWASP advice about using normalize()
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864882 13f79535-47bb-0310-9956-ffa450edef68
2019-08-10 15:52:12 +00:00
Nicolas Malin 8e17e45916 Implemented: Backport: Helper script to download the gradle wrapper
(OFBIZ-10145)
Add a helper script to download gradle-wrapper.jar and gradle-wrapper.properties 
at version 5.0.0 from bintray [1] when gradle/wrapper/gradle-wrapper.jar isn't present.

To use it just run at the OFBiz root :
    $ sh gradle/init-gradle-wrapper.sh

[1] https://dl.bintray.com/apacheofbiz/GradleWrapper/
[2] https://github.com/gradle/gradle/blob/v5.0.0/gradle/wrapper/

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864816 13f79535-47bb-0310-9956-ffa450edef68
2019-08-09 15:19:45 +00:00
Jacques Le Roux d12eed7bc9 "Applied fix from trunk for revision: 1864721"
------------------------------------------------------------------------
r1864721 | jleroux | 2019-08-08 17:52:04 +0200 (jeu. 08 août 2019) | 9 lignes

Fixed: In Product Image Management Uploading file fails due to missing 
StatusValidChange
(OFBIZ-11148)
The error is
java.lang.Exception: Error in Service [updateContent]: Error: 
status change from [CTNT_IN_PROGRESS] to [IM_PENDING] is not allowed.

The issue does not exist in R16. So I guess it's because of OFBIZ-9907.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864722 13f79535-47bb-0310-9956-ffa450edef68
2019-08-08 15:52:39 +00:00
Jacques Le Roux 48288bf702 "Applied fix from trunk for revision: 1864716"
------------------------------------------------------------------------
r1864716 | jleroux | 2019-08-08 17:28:45 +0200 (jeu. 08 août 2019) | 15 lignes

Fixed: [FB] Find Security Bugs
(OFBIZ-9973)

FindBugs is now deprecated and replaced by Spotbugs

Last time I forgot to encode productId as reported by Man Yue Mo from Semmle

This eventually fixes the "Relative path traversal" issue reported by Spotbugs
by encoding the whole file name.

Nevertheless Spotbugs continues to report the same issue in trunk but not in R16
I have not ideas why and I see no other possible issue. 

I will backport and check again.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864717 13f79535-47bb-0310-9956-ffa450edef68
2019-08-08 15:29:23 +00:00
Aditya Sharma c0607222a8 Applied fix from trunk for revision: 1864216
===

Fixed: favicon.ico missing for LookupDecorator
(OFBIZ-11146)
The ListVisualTheme page uses LookupDecorator and in the absence of any shortcut icon the browser hits favicon.ico file by default. 
Additional change: Fixed path for title.gif specific to Flatgrey theme


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1864217 13f79535-47bb-0310-9956-ffa450edef68
2019-08-02 11:15:37 +00:00
Jacques Le Roux 78f445fd59 "Applied fix from trunk for revision: 1863965"
------------------------------------------------------------------------
r1863965 | jleroux | 2019-07-29 20:08:45 +0200 (lun. 29 juil. 2019) | 12 lignes

Improved: Improper alignment of Status, OrderDate and PartyId column header on 
Find Orders page
(OFBIZ-11116)

Steps to regenerate:

1. Go to the order component (ordermgr/control/main)
2. Click on Find Orders submenu (ordermgr/control/findorders)
3. Click on Find button.
4. Last 3 column headers of the table are not aligned properly.

Thanks: Humera Khan for report and Ashish Kumar Pandey for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1863966 13f79535-47bb-0310-9956-ffa450edef68
2019-07-29 18:09:15 +00:00
Aditya Sharma e8c5645003 Applied fix from trunk for revision: 1863838
===

Fixed: Check embedded Javascript libs vulnerabilities using retire.js
(OFBIZ-10678)
1. For solving CVE-2019-11358, upgraded jQuery to 3.4.1
2. Replaced library Fancybox with Featherlight. Added custom css so that cursor for links becomes pointer
Thanks Jacques Le Roux for the reviews


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1863843 13f79535-47bb-0310-9956-ffa450edef68
2019-07-27 08:53:46 +00:00
Jacques Le Roux cb70c0a105 "Applied fix from trunk for revision: 1863560"
------------------------------------------------------------------------
r1863560 | jleroux | 2019-07-22 17:21:14 +0200 (lun. 22 juil. 2019) | 37 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

Today Olivier reported directly to me that there was an issue in HR:
<<If you go to humanres, at the level of the tree that appears the icons to expand 
the tree no longer appear (but you can click...)
This is due to the path of the d.png image which is wrong in the css file 
(there is too much image in the path)>>

I should have seen it because the d.png file is, with other related image files,
in the same directory than style.css. And there was an inconsistency in the
style.css files regarding the d.png file path.

We should note that we have still this error in log:
2019-07-22 16:25:26,275 |jsse-nio-8443-exec-7 |ControlServlet                
|E| Error in request handler:
org.apache.ofbiz.webapp.control.RequestHandlerException: Unknown request [d.png]; 
this request does not exist or cannot be called directly.
at org.apache.ofbiz.webapp.control.RequestHandler.doRequest
(RequestHandler.java:277) ~[ofbiz.jar:?]

As I wrote in my last commit for OFBIZ-10895:
The only safe way to go is to not only check the error log for 
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log.

Some error appears before the user is logged in, as I wrote in the Jira:
<<I noticed that this error message often appears before login. A 404 can be 
seen in the access log and then once logged the issue no longer exists 
(ie we get a 200). I have no yet investigated why...>>

Nevertheless, I want to remove this misleading error message. I hope I'll do 
that before forgetting.

Thanks: Olivier Heintz 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1863562 13f79535-47bb-0310-9956-ffa450edef68
2019-07-22 15:22:03 +00:00
Jacques Le Roux 1158ef2ea8 "Applied fix from trunk for revision: 1862648"
------------------------------------------------------------------------
r1862648 | jleroux | 2019-07-06 11:42:46 +0200 (sam. 06 juil. 2019) | 14 lignes

Fixed: Error message is displayed when user having space in username logs 
in at ecommerce
(OFBIZ-10671)

Pierre pointed out that the NotValidUserName label NL translation was wrong and 
proposed a right one.

Looking at it closer EN and FR were not totally right either. I have fixed them.
Before committing, I wondered if we should remove all other languages, then 
English would be used. Or if we let it as is for users of these languages to 
propose a fix, as Pierre did. I'm more for the later, then end users who don't 
speak English would at least have something they can read and possibly amend.

Thanks: Pierre Smits
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862649 13f79535-47bb-0310-9956-ffa450edef68
2019-07-06 09:44:14 +00:00
Jacques Le Roux eb681974b2 "Applied fix from trunk for revision: 1862466 "
------------------------------------------------------------------------
r1862466 | jleroux | 2019-07-03 15:30:28 +0200 (mer. 03 juil. 2019) | 20 lignes

Fixed: Error message is displayed when user having space in username logs 
in at ecommerce
(OFBIZ-10671)

Steps to regenerate:
 # Open URL: [https://demo-trunk.ofbiz.apache.org/ecommerce/control/main]
 # Click on register in header section
 # Provide all the mandatory information but provide a user name such that is 
    contains a space (like: Walter White or Jesse Pinkman)
 # Click on save button

Actual: When user clicks on save button then he is redirected to main page of 
ecommerce and an error message is displayed. 
Similarly when user with space in username tries to login, error message is 
displayed. 

Praven: Added standard regex for username allowed alphabets, numbers, and _-
jleroux: actually "-" was  missing in the regepx definition.

Thanks: Arpit Mor for report and Praveen Sharma for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862468 13f79535-47bb-0310-9956-ffa450edef68
2019-07-03 13:31:59 +00:00
Jacques Le Roux 895b932396 "Applied fix from trunk for revision: 1862278"
------------------------------------------------------------------------
r1862278 | jleroux | 2019-06-28 13:53:55 +0200 (ven. 28 juin 2019) | 17 lignes

Fixed: User should be notified with success message on MRP run in manufacturing component
(OFBIZ-9533)

Steps to regenerate:
1. Go to Manufacturing component (manufacturing/control/main)
2. Click on Mrp sub menu (manufacturing/control/FindInventoryEventPlan)
3. Click on Run Mrp button.(manufacturing/control/RunMrp)
4. Select Facility/Facility Group and Click Submit button.
On success, the user should be notified with success message like 
"Mrp run is scheduled".

jleroux: despite being a sub-task of an improvement I decided to backport. 
It works well and nothing could go wrong, only UI changes.

Thanks: Aditya Sharma for report, Humera Khan for the fix, Prachi Shastri for
testing and Pierre Smits for noticing this could be backported (despite being
a sub-task of an improvement)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862279 13f79535-47bb-0310-9956-ffa450edef68
2019-06-28 11:55:09 +00:00
Jacques Le Roux 8ee57b3815 "Applied fix from trunk for revision: 1862271"
------------------------------------------------------------------------
r1862271 | jleroux | 2019-06-28 11:39:44 +0200 (ven. 28 juin 2019) | 11 lignes

fixed: supplierProductId Should Have Consistent Types Across Entities.
(OFBIZ-10150)

During some data migration I hit an issue where my data for supplierProductId 
was too long. So I looked up the fields and noticed that the order item entity 
had a different type for the field than the supplier product entity.

jleroux: we should do it for all cases
 

Thanks: jesse thomas for report and Rohit Hukkeri for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862272 13f79535-47bb-0310-9956-ffa450edef68
2019-06-28 09:40:26 +00:00
Jacques Le Roux 6207c23328 "Applied fix from trunk for revision: 1862207"
------------------------------------------------------------------------
r1862207 | jleroux | 2019-06-27 14:03:21 +0200 (jeu. 27 juin 2019) | 8 lignes

Fixed: Export XML data, ,o proper error message displayed if user misses to 
select entities 
(OFBIZ-11125)

No Proper error message is displayed if user misses to select entities from the 
list, and throw error message

Thanks: Jayansh Shinde
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862208 13f79535-47bb-0310-9956-ffa450edef68
2019-06-27 12:03:53 +00:00
Jacques Le Roux 371fc2f9c6 "Applied fix from trunk for revision: 1862046"
------------------------------------------------------------------------
r1862046 | jleroux | 2019-06-25 11:44:54 +0200 (mar. 25 juin 2019) | 1 ligne

Reverted: it was not supposed to be committed, "wrong button" while backporting
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1862047 13f79535-47bb-0310-9956-ffa450edef68
2019-06-25 09:48:27 +00:00
Jacques Le Roux 7bc11a1ed8 "Applied fix from trunk for revision: 1861869"
------------------------------------------------------------------------
r1861869 | jleroux | 2019-06-22 16:19:09 +0200 (sam. 22 juin 2019) | 15 lignes

Fixed: Logo image not showing on party profile 
(OFBIZ-9299)

Logo image not displayed until we press in content component

Logo image was not showing on party profile page because we were using Ajax 
request to add party content on the party profile screen. 
So due to ajax request screen was not getting refreshed. 

To display logo image we did the following changes:
1) Removed ajax request and rendered profile view screen after submit
2) Used ofbizUrl macro to show an image instead of /content/control/stream URL


Thanks: Moatasim Al Masri for reporting, Mohammed Rehan Khan for fixing
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861870 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 14:20:01 +00:00
Pawan Verma 8c7dc18808 Applied fix from trunk for revision: 1861859
===

Fixed: Issue in which Ecommerce anonymous contactus was having wrong fromAddress.
(OFBIZ-10844)
As per my understanding, sendFrom email cannot be the customer's email address.

Email settings for this email are maintained at ProductStoreEmailSetting with CONT_NOTI_EMAIL as emailType and like other notifications, we should use ProductStoreEmailSetting.fromAddress to send this email which is configurable.
Thanks: Schumann Ye for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861860 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 12:18:28 +00:00
Pawan Verma 69ec5d3bf9 Applied fix from trunk for revision: 1861849
===

Fixed: Issue of agreement overview does not show names of parties.
(OFBIZ-10900)
Thanks Pierre Smits for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861850 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 11:51:59 +00:00
Mridul Pathak 93d585b66c Applied fix from trunk r1861838.
Fixed: Getting an error while creating event from SFA without providing event name.
(OFBIZ-11109)

Thanks Harman Kaur Matharu for reporting and Aditi Patidar for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861842 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 10:42:59 +00:00
Suraj Khurana 0b401c2963 Applied fix from trunk for revision: 1861837
===

Fixed: Issue with Status of invoice.
(OFBIZ-10310)
Cause: Missing statusId in parameters.
Thanks Aayush Jain for reporting and Devanshu Vyas for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861839 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 10:35:50 +00:00
Pawan Verma 8c9c0e07dd Applied fix from trunk for revision: 1861834
===

Improved: Removed old pattern directory for groovy scripts.
(OFBIZ-10903)
Thanks Deepak Dixit for reporting.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861836 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 10:21:51 +00:00
Pawan Verma 76974812e7 Applied fix from trunk for revision: 1861828
===

Improved: Made Gradle createPlugin task reflect the actual file/folder structure.
(OFBIZ-10903)
Modified Gradle createPlugin task to reflect the groovyScripts and minilang directory instead old script directory. 
Thanks, Michael Brohl for reporting.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861835 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 10:21:11 +00:00
Suraj Khurana 8c91f90696 Applied fix from trunk for revision: 1861815
===

Fixed: AutoDescription of promotion showing invalid text.
(OFBIZ-10853)
Modified code as per latest changes of inputParamEnumId and customMethodId.
Thanks Lalit Dashora for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861816 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 05:56:59 +00:00
Suraj Khurana e3b5113a65 Applied fix from trunk for revision: 1861811
===

Fixed: Promotion condition/action type of few promotion not showing.
(OFBIZ-10794)
This was caused due to some refactoring work in promotions screens related inputParamEnumId and customMethodId.
Thanks Lalit Dashora for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861812 13f79535-47bb-0310-9956-ffa450edef68
2019-06-22 05:02:18 +00:00
Aditya Sharma 868210f397 Applied fix from trunk for revision: 1861615
===

Fixed: typo in the NOTICE file content


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1861616 13f79535-47bb-0310-9956-ffa450edef68
2019-06-19 11:36:41 +00:00
Suraj Khurana e9356e912f Applied fix from trunk for revision: 1860797
===

Fixed: Profile of contact person not shown on quick add of contact in SFA.
(OFBIZ-7816)
Issue occurred due to missing redirect parameter.
Thanks Rohit Hukkeri for providing the updated patch and everyone else for their contribution in this ticket.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860798 13f79535-47bb-0310-9956-ffa450edef68
2019-06-08 05:23:11 +00:00
Jacopo Cappellato d3ac529e55 Applied fix from trunk for revision: 1860613
===

Fixed: fine tuned the sanitization of user input by allowing "safe" content; 
thanks to Jacques for the suggestion.

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860614 13f79535-47bb-0310-9956-ffa450edef68
2019-06-04 13:22:49 +00:00
Deepak Dixit d19e159e52 Applied fix from trunk for revision: 1860597
===

Fixed: Html escaping missing for renderLink parameters
(OFBIZ-11090)
Parameters vlaue should be escaped to avoid any kind of corss site scripting issue.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860598 13f79535-47bb-0310-9956-ffa450edef68
2019-06-04 10:50:02 +00:00
Jacopo Cappellato 96d65b8a5c Applied fix from trunk for revision: 1860592
===

Fixed: removed override directives to let the system perform proper validation 
of user input.

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860593 13f79535-47bb-0310-9956-ffa450edef68
2019-06-04 09:16:18 +00:00
Jacques Le Roux cb280dff34 "Applied fix from trunk for revision: 1860526 "
------------------------------------------------------------------------
r1860526 | jleroux | 2019-06-02 15:10:36 +0200 (dim. 02 juin 2019) | 11 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

I was wrong doing massive changes w/o close control. 
I decided to revert the r1859576 and r1859807 commits and to backport the revert

The only safe way to go is to not only check the error log for 
"Unknown request [...."
but also to look for 404 in access log, not all request show erroneously in
error log/
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860527 13f79535-47bb-0310-9956-ffa450edef68
2019-06-02 13:11:27 +00:00
Nicolas Malin 5e01d49a4e Fixed: Backport: Decrypt a field on embedded entity-view failed
(OFBIZ-11078)

When you tried to decrypt a field present on embedded entity-view, key use is the view name and not the final entity who contains this field.

You currently have the problem on PartyContactMechDetail where if you want to displaying the ftpPassword for a FtpAddress, the view failed and tried to use ContactMechDetail to decrypt instead of FtpAddress

To solve it, we iterate on the entity contains the field in the view while is an entity-view :

    PartyContactMechDetail.ftpPassword
         -> ContactMechDetail.ftpPassword
              -> FtpAddress.ftpPassword
                   -> key found FtpAddress

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860366 13f79535-47bb-0310-9956-ffa450edef68
2019-05-29 18:54:04 +00:00
Jacques Le Roux 2bd0c26791 "Applied fix from trunk for revision: 1860357"
------------------------------------------------------------------------
r1860357 | jleroux | 2019-05-29 18:29:31 +0200 (mer. 29 mai 2019) | 14 lignes

Fixed: Gradle eclipse task - classpath modification (Add exclusion for 
<OFBiz>/framework/base/config and <OFBiz>/framework/base/dtd)
(OFBIZ-11071)

Eclipse task removes all classpath entries that affects following entries also -
 * <OFBiz>/framework/base/config
 * <OFBiz>/framework/base/dtd

These two entries are essential to start OFBiz successfully. 
Developer has to manually add these entries back to start OFBiz from IDE.

Following this discussion: https://s.apache.org/baoT

Thanks: Girish Vasmatkar
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860358 13f79535-47bb-0310-9956-ffa450edef68
2019-05-29 16:30:32 +00:00
Swapnil Mane fedea4ddce Applied fix from trunk for revision: 1860274
===

Fixed: Corrected the navigation of 'To Facility ID' on the inventory transfer screen
(OFBIZ-10992)

Steps to regenerate:

1.) Go to Facilities.
2.) Select Inventory Xfers option.
3.) Create Transfer Inventory Item from any Warehouse.
4.) Navigate to Transfer Inventory overview screen
https://localhost:8443/facility/control/TransferInventoryItem?inventoryTransferId=10001
5.) 'Facility Id To' link is not redirecting to correct facility

Thanks:  Pawan Verma and Aishwary Shrivastava for your contribution.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860275 13f79535-47bb-0310-9956-ffa450edef68
2019-05-28 14:05:14 +00:00
Jacques Le Roux a3f890f8f4 "Applied fix from trunk for revision: 1860141"
------------------------------------------------------------------------
r1860141 | jleroux | 2019-05-27 18:28:32 +0200 (lun. 27 mai 2019) | 13 lignes

Fixed: Edit WebSite Path Alias is not working
(OFBIZ-11022)

Steps to regenerate:
    Login into content
    Select any website(Preferably CmsSite as it has pathAlias)
    Click on pathAlias tab
    Select any pathAlias to edit

See edit option is not available on screen, Create option is available which 
is creating new pathAlias instead of edit.

Thanks: Pawan Verma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860142 13f79535-47bb-0310-9956-ffa450edef68
2019-05-27 16:29:24 +00:00
Suraj Khurana 898bd79421 Applied fix from trunk for revision: 1860082
===

Fixed: CSS Styling for Party Content progress bar is wrong in multiple theme.
(OFBIZ-10797)
Thanks Ayushi Rathod for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1860083 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 16:11:36 +00:00
Jacques Le Roux 5c002a1e39 "Applied fix from trunk for revision: 1859981"
------------------------------------------------------------------------
r1859981 | jleroux | 2019-05-25 16:24:30 +0200 (sam. 25 mai 2019) | 14 lignes

Fixed: Runtime error exceptions at Leads page
(OFBIZ-11059)

Step to recreate issue -

    Login to https://demo-trunk.ofbiz.apache.org/ordermgr/control/main
    Application > SFA
    SFA > Lead Manager 
    Leads > Click on All Leads button

Application throw Runtime error exception in My Leads section.

Thanks: Sanjay Yadav for report, Kumar Rahul for the fix and Pierre Smits
for help on Jira issue
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859985 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:32:23 +00:00
Jacques Le Roux d06ad50f70 "Applied fix from trunk for revision: 1859972"
------------------------------------------------------------------------
r1859972 | jleroux | 2019-05-25 16:08:48 +0200 (sam. 25 mai 2019) | 12 lignes

Fixed: Duplicate entries in paramWithSuffix
(OFBIZ-11056)

when using string-list-suffix attribute for service definition, invoke method 
(from associated event handler) will try to parse parameters from both request 
variable and rawParameterMap which was also built from request. 
So we end up with duplicates in resulting list.

This behaviour seems to be introduced with OFBIZ-5048.


Thanks: Samuel Trégouët for report and fix 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859973 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 14:10:46 +00:00
Jacques Le Roux 8f76ba6c67 "Applied fix from trunk for revision: 1859968"
------------------------------------------------------------------------
r1859968 | jleroux | 2019-05-25 15:25:34 +0200 (sam. 25 mai 2019) | 16 lignes

Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

The testCreateNewRequest was failing due to escaped single quotes in related
data in OrderTypeData.xml:
subject="OFBiz - Your Request is received: '${custRequestName}' #CR${custRequestId}"

This was a peculiar case that could be generalised to all escapable characters.
The general solution is to compare the original value with the filtered value 
unescaped in UtilCodec::checkStringForHtmlSafe.
BTW, weirdly enough StringEscapeUtils::escapeHtml4 does not escape single quote.

Another weirdness is the test was passing with plugins data loaded. This is due
to duplicated demo data in scrumTypeData.xml (which is actually not only type
data, as ever the scrum component is a mess, that's not new and always wonder
if we should not get rid of it!)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859969 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 13:34:45 +00:00
Swapnil Mane 9bb15d8348 Applied fix from trunk for revision: 1859931
===

Fixed: Error on deleting the survey associated with the task
(OFBIZ-7594)

The following error is generated on deleting the survey associated with the task.

Error calling event: org.apache.ofbiz.webapp.event.EventHandlerException: Problems getting the service model (Cannot locate service by name (deleteWorkEffortSurveyAppl))

On exploration I found, In the refactoring work done under OFBIZ-8408, the deleteWorkEffortSurveyAppl service was removed.

Added the deleteWorkEffortSurveyAppl service, previously it was in written in the simple engine, converted it to entity-auto.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859933 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 09:28:09 +00:00
Suraj Khurana d63e7d20ec Applied fix from trunk for revision: 1859915
===

Fixed: Enable entity timestamp fields.
(OFBIZ-10959)
While working on a Production environment, it is found that for some reason entity timestamp fields are disabled at Search Results screen in Trunk and the previous release branch.

Thanks Pawan Verma for reporting the issue and providing the patch, Jacques, Gil, Mathieu for reviewing it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859916 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 08:27:34 +00:00
Suraj Khurana 9b9cdb650e Applied fix from trunk for revision: 1859911
===

Fixed: Issue in order history promotion.
(OFBIZ-10847)
Issue: According to the promotion customer should spend 000 in any 12 months to avail 5% discount. The system is providing the discount even if the customer is not logged in.
Thanks Lalit Dashora for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859912 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 06:26:30 +00:00
Suraj Khurana 7fcea6f2ef Applied fix from trunk for revision: 1859909
===

Fixed: Drop-ship process behaves incorrectly when a combination of drop-ship and non-drop-ship products are added into the cart.
(OFBIZ-11021)
RequirementMethodEnumId should be decided in the order of property set at ProductStore -> Facility -> Product for each order item which was not working if the non-drop shippable product(s) is added after the drop shippable product(s).

Original Flow: requirementMethodEnumId was initialized outside the loop and once it is initialized with Product level information it never gets re-initialized if Product is non-drop shippable.
We have updated the code to use the storeRequirementMethodEnumId variable for store level information which is defined outside the loop and this will be used to initialize requirementMethodEnumId for each order item and then product level information can override it. That means for each product ProductStore -> Facility -> Product this rule will work properly.

Thanks Pawan Verma for reporting the issue and providing the patch and Jacques Le Roux for review.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859910 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 06:13:21 +00:00
Nicolas Malin 30f2125894 Fixed: Backport: Manage EECAs on delegator.removeBy
(OFBIZ-11040)
When you delete some entities through removeByAnd or removeByCondition, eeca aren't enable and the remove is quite as regard implemented rules.
With
        <eca entity=GoodIndentification operation=create-store-remove event=return>
             <action service=indexProductKeywords mode=sync/>
        </eca>
And
        delegator.removeByAnd('GoodIdentification', [productId: 'WG-1111'])

The service indexProductKeywords wasn't call for the productId WG-1111

To solve this situation, the idea would be delegator.removeValue for each element to delete when an eeca is present otherwise call the standard helper.removeByCondition.

Thanks to Leila Mekika for raise and fix this issue, Jacques Leroux and Mathieu Lirzin for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859888 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 15:08:22 +00:00
Jacques Le Roux 17e47b6730 "Applied fix from trunk for revision: 1859882"
------------------------------------------------------------------------
r1859882 | jleroux | 2019-05-24 16:16:39 +0200 (ven. 24 mai 2019) | 5 lignes

Improved: no functional change

Javadoc was unhappy: 
CustomPermissivePolicy.java:13: error: element not closed: blockquote

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859883 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 14:17:04 +00:00
Jacques Le Roux daa2c243a9 "Applied fix from trunk for revision: 1859877"
------------------------------------------------------------------------
r1859877 | jleroux | 2019-05-24 15:47:08 +0200 (ven. 24 mai 2019) | 10 lignes

Fixed: Services allow arbitrary HTML for parameters with allow-html set to "safe"
(OFBIZ-5254)

This was reopened after discussion at 
https://markmail.org/message/jnaitmwahjcjmdn5

This is a new solution which follows the work done with OFBIZ-6669 and OFBIZ-10187
Roughly said, it uses org.owasp.html.PolicyFactory and org.owasp.html.Sanitizers

Thanks: Christoph Neuroth for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859878 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:51:26 +00:00
Jacques Le Roux d347fa1d62 "Applied fix from trunk for revision: 1859871"
------------------------------------------------------------------------
r1859871 | jleroux | 2019-05-24 15:24:31 +0200 (ven. 24 mai 2019) | 14 lignes

Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

After a discussion with Dennis, I checked and the pattern ONSITE_URL would be 
useless without 

.allowAttributes("background").matching(ONSITE_URL)
.onElements("table")
.allowAttributes("background").matching(ONSITE_URL)
.onElements("td", "th", "tr")

So here they are

Thanks: Dennis Balkir for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859872 13f79535-47bb-0310-9956-ffa450edef68
2019-05-24 13:27:35 +00:00
Jacques Le Roux 1f78b219e5 "Applied fix from trunk for revision: 1859807"
------------------------------------------------------------------------
r1859807 | jleroux | 2019-05-23 18:41:59 +0200 (jeu. 23 mai 2019) | 5 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be called 
directly.
(OFBIZ-10895)

This should be the last commit, but I can't be sure. So I'll continue to 
monitor the demos logs...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859808 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:43:12 +00:00
Jacques Le Roux c335f3187d "Applied fix from trunk for revision: 1859800"
------------------------------------------------------------------------
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
2019-05-23 16:37:34 +00:00
Jacques Le Roux 27a375771b "Applied fix from trunk for revision: 1859796"
------------------------------------------------------------------------
r1859796 | jleroux | 2019-05-23 18:33:26 +0200 (jeu. 23 mai 2019) | 5 lignes

Fixed: Mass actions in FindOrders.ftl don't keep parameters
(OFBIZ-11052)

This adds a missing ampersand  after requestParameters.hideFields?default("N") 
when needed 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859797 13f79535-47bb-0310-9956-ffa450edef68
2019-05-23 16:34:30 +00:00
Jacques Le Roux acaeedb53a "Applied fix from trunk for revision: 1859735 "
------------------------------------------------------------------------
r1859735 | jleroux | 2019-05-22 18:41:04 +0200 (mer. 22 mai 2019) | 12 lignes

Fixed: massPrintOrders service does not work
(OFBIZ-11049)

This problem was similar to what was resolved by r1806237 for OFBIZ-9138.

This fixes it by using the same solution than in r1806237. If the visual theme 
is unknown in the the service  context  get the default theme from 
general.properties using ThemeFactory::resolveTheme.

sendPrintFromScreen, createFileFromScreen, sendBirtMail, getXslFo and 
printReportPdf (in example) were concerned

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859736 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 16:41:45 +00:00
Jacques Le Roux edb688307f "Applied fix from trunk for revision: 1859708"
------------------------------------------------------------------------
r1859708 | jleroux | 2019-05-22 11:33:46 +0200 (mer. 22 mai 2019) | 8 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

Getting to navigateContent in content component is better when using view.
You then get into the node you were working on (adding, updating or deleting)

Still WIP for the rest...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859709 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 09:34:33 +00:00
Jacques Le Roux 2d8ee0a04d "Applied fix from trunk for revision: 1859704"
------------------------------------------------------------------------
r1859704 | jleroux | 2019-05-22 10:59:45 +0200 (mer. 22 mai 2019) | 8 lignes

Fixed: When you select a ProductManufacturingRule if several exist only the one 
selected will show multiple times in the list
(OFBIZ-11048)

When you select a ProductManufacturingRule if several exist only the one 
selected will show multiple times in the list

This was due to a wrong usage of auto-fields-service, from pre Apache era
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859705 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 09:00:20 +00:00
Jacques Le Roux 5d4da69296 "Applied fix from trunk for revision: 1859698"
------------------------------------------------------------------------
r1859698 | jleroux | 2019-05-22 10:12:51 +0200 (mer. 22 mai 2019) | 10 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

Reverts r1859694 request-redirect-noparam is required else the deleted 
ProductManufacturingRule is shown in the edit/update screen with the deleted
ruleId.

I was misleaded because this screen is not standard at all. I guess it's not
much used since it's like that for ages
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859699 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 08:13:36 +00:00
Jacques Le Roux 96fa460f5c "Applied fix from trunk for revision: 1859694"
------------------------------------------------------------------------
r1859694 | jleroux | 2019-05-22 09:44:55 +0200 (mer. 22 mai 2019) | 5 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

No problems using view here, KISS!
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859696 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 07:48:21 +00:00
Jacques Le Roux 3147ed6a63 "Applied fix from trunk for revision: 1859691"
------------------------------------------------------------------------
r1859691 | jleroux | 2019-05-22 09:39:08 +0200 (mer. 22 mai 2019) | 15 lignes

Fixed: It's impossible to create more than 1 ProductManufacturingRule
(OFBIZ-11047)

In a previous commit for OFBIZ-9997 I wrote:
>DeleteProductManufacturingRule seems weird to me because I don't understand how
>to create several Manufacturing Rules. I'll check Sharan's book :)

I checked Sharan's book and there is nothing about it

It also shows ManufacturingMachineGroupIdAlreadyExist ("Fixed Asset Group ID 
doesn't exist") when you try to create one using manually the 
AddProductManufacturingRule service which makes no sense.

This fixes it by adding the necessary in BomForms.xml and fixing 
addProductManufacturingRule which was wrong from start (pre Apache era)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859692 13f79535-47bb-0310-9956-ffa450edef68
2019-05-22 07:39:52 +00:00
Jacques Le Roux 517b300063 "Applied fix from trunk for revision: 1859576"
------------------------------------------------------------------------
r1859576 | jleroux | 2019-05-20 20:02:09 +0200 (lun. 20 mai 2019) | 15 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

This error happens in many occasions.
It shows only in log and have no effect on UI.
It happens in all supported releases. 
So it's not very bad since it's has no side effects.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

I finally decided to do a whole change, here it is
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859577 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 18:03:03 +00:00
Jacques Le Roux cf377c0dc5 "Applied fix from trunk for revision: 1859571"
------------------------------------------------------------------------
r1859571 | jleroux | 2019-05-20 19:14:43 +0200 (lun. 20 mai 2019) | 22 lignes

Fixed: field emplFromDate is forgot in PayHistory entity
(OFBIZ-11028)

Arpit Mor: steps to regenerate:
    Login to the URL: https://demo-trunk.ofbiz.apache.org/humanres/control/main
    Click on Employments
    Click on New Employments
    Click on Create
Actual: Error message is displayed.

Olivier Heintz: employment is associated with PayHistory, and there is a problem 
in PayHistory entity definition in OFBiz,
In PayHistory, the field fromDate from Employment is confused with fromDate 
about the current record.
A Employment can have multiple PayHistories and should have multiple
because PayHistory should show history of Pay  for a employment  !
It's necessary to have a field emplFromDate (to have the complete employment 
primaryKey).
When modifying a PayRecord the current should be expire and a new one should 
be created.

Thanks: Arpit Mor for report at OFBIZ-10969 and Olivier Heintz for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859572 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 17:16:16 +00:00
Jacques Le Roux 79a02bddb9 "Applied fix from trunk for revision: 1859543"
------------------------------------------------------------------------
r1859543 | jleroux | 2019-05-20 12:10:34 +0200 (lun. 20 mai 2019) | 24 lignes

Fixed: Redirection of pathAlias to aliasTo does not work properly
(OFBIZ-11018)

Link of discussion: https://markmail.org/message/s37whdteejqdzkha

In CMS, we can redirect the user to different path alias using 'aliasTo' field 
of WebSitePathAlias entity.

As per my observation, the content for  "newDemoHome" is rendered properly 
(as expected) but the URL of the page (in browser) doesn't change.
We should also update the URL also, i.e. change browser URL from

Example - 
<WebSitePathAlias aliasTo="demoPage2" fromDate="2016-06-09 13:37:30.43" 
pathAlias="demoHome2" webSiteId="CmsSite"/>
<WebSitePathAlias contentId="CMSS_DEMO_PAGE1" fromDate="2016-06-09 13:37:30.43" 
pathAlias="demoPage2" webSiteId="CmsSite"/>

Based on the above data, if the user hit the 
URL https://localhost:8443/cmssite/cms/demoHome2 
the CMS should internally render the content for 'DemoHome2' at
https://localhost:8443/cmssite/cms/demoPage2

Thanks: Pawan Verma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859544 13f79535-47bb-0310-9956-ffa450edef68
2019-05-20 10:11:23 +00:00
Nicolas Malin 1fb06865a1 Fixed: Backport: Incorrect findByCount on DynamicView with groupBy and selected fields
(OFBIZ-11041)

When you create a DynamicView with 'group by' agreggate function and you perform a delegator.findCountByCondition() with selected fields, the result is different from the count of each element returned by delegator.findList().

The problem come from when the 'group by' closure is populated with all grouped by fields from on the DV and not only those from selected fields.

Thanks to Leila Mekika to raise and solve this issue.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859439 13f79535-47bb-0310-9956-ffa450edef68
2019-05-17 15:48:46 +00:00
Jacques Le Roux 9d3f383e90 "Applied fix from trunk for revision: 1859268"
------------------------------------------------------------------------
r1859268 | jleroux | 2019-05-15 08:17:03 +0200 (mer. 15 mai 2019) | 15 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

This error happens in many occasions.
It shows only in log and have no effect on UI.
It happens in all supported releases. 
So it's not very bad since it's has no side effects.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a commit in HR (fix previous one at r1859263)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859269 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 06:17:37 +00:00
Jacques Le Roux 6f8f46b939 "Applied fix from trunk for revision: 1859263"
------------------------------------------------------------------------
r1859263 | jleroux | 2019-05-15 07:58:31 +0200 (mer. 15 mai 2019) | 17 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

This error happens in many occasions.
It shows only in log and have no effect on UI.
It happens in all supported releases. 
So it's not very bad since it's has no side effects.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a commit in HR

Thanks: Deepak 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859264 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 05:59:45 +00:00
Aditya Sharma 42ca75f990 Applied fix from trunk for revision: 1859255
===

Fixed: Issue in function getVariantSelectionFeatures of ProductWorker.java
(OFBIZ-11029)
Check should be isVirtual instead of productId. Also handled a NullPointerException for variantProduct.
Thanks Denglong Zhou for reporting the issue, Pawan Verma for the patch and Suraj Khurana & Jacques Le Roux for the review


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859256 13f79535-47bb-0310-9956-ffa450edef68
2019-05-15 05:10:52 +00:00
Mathieu Lirzin 4fd92eea61 Fixed: Fix javadoc build for OpenJDK 11
(OFBIZ-10757)

This removes HTML5 deprecated stuff such as ‘<tt>’ elements, and
‘cellpadding’ table attributes which were breaking the ‘:javadoc’
Gradle task when using OpenJDK 11.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859124 13f79535-47bb-0310-9956-ffa450edef68
2019-05-11 20:40:37 +00:00
Jacques Le Roux a1f461a6b3 "Applied fix from trunk for revision: 1859087"
------------------------------------------------------------------------
r1859087 | jleroux | 2019-05-10 19:01:12 +0200 (ven. 10 mai 2019) | 16 lignes

Fixed: Replace request-redirect w/ no redirect-param attribute by 
request-redirect-noparam
(OFBIZ-9997)

At least importContactListParties in marketing component needs 
request-redirect instead of request-redirect-noparam
This reverts it. 

Others still needs to be checked. 
It seems getting to navigateContent in content component is OK, but not totally
sure yet

DeleteProductManufacturingRule seems weird to me because I don't understand how
to create several Manufacturing Rules. I'll check Sharan's book :)

WIP...
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859088 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 17:02:10 +00:00
Jacques Le Roux 20f97a5f56 "Applied fix from trunk for revision: 1859055 "
------------------------------------------------------------------------
r1859055 | jleroux | 2019-05-10 07:15:28 +0200 (ven. 10 mai 2019) | 4 lignes

Fixed: no functional changes

Fixes typos

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859056 13f79535-47bb-0310-9956-ffa450edef68
2019-05-10 05:15:56 +00:00
Jacques Le Roux 95cd90ff22 "Applied fix from trunk for revision: 1859033"
------------------------------------------------------------------------
r1859033 | jleroux | 2019-05-09 21:46:07 +0200 (jeu. 09 mai 2019) | 21 lignes

Fixed: Update invoice item looses invoice context
(OFBIZ-11009)

When clicking  the "update" button on an invoice item the context to the 
invoice (invoiceId) is lost. The result is an empty form to add a new invoice 
item without invoice context.

Go to /accounting/control/listInvoiceItems?invoiceId=demo10001
Click on "update" below the existing items. 
You will then be redirect to /accounting/control/listInvoiceItems 
(without invoiceId). You will not see the invoice items as the context to the 
invoice is gone.

jleroux: the same existed for budget items. As Ingo mentioned:
<<It was broken by OFBIZ-9997:
Replace request-redirect w/ no redirect-param attribute 
by request-redirect-noparam>>

Now we need to check all changes done for OFBIZ-9997

Thanks: Ingo Wolfmayr for report and fix proposition
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1859034 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 19:47:00 +00:00
Jacques Le Roux 8853af74ed "Applied fix from trunk for revision: 1858980 "
------------------------------------------------------------------------
r1858980 | jleroux | 2019-05-09 11:17:08 +0200 (jeu. 09 mai 2019) | 4 lignes

Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

By default we now use a permissive sanitizer policy
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858981 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 09:21:20 +00:00
Jacques Le Roux bdfc43319f "Applied fix from trunk for revision: 1858483"
------------------------------------------------------------------------
r1858483 | mthl | 2019-05-01 14:55:51 +0200 (mer. 01 mai 2019) | 7 lignes

Improved: Remove unneeded generics in ‘MapContextTest’
(OFBIZ-10933)

This is done to remove a warning in OpenJDK 8 which doesn't seem to
handle ‘@safevarargs’ annotation properly when using generics.  This
warning was not present with OpenJDK 11.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858979 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 09:01:19 +00:00
Jacques Le Roux f6206c1774 "Applied fix from trunk for revision: 1858965"
------------------------------------------------------------------------
r1858965 | jleroux | 2019-05-09 08:05:05 +0200 (jeu. 09 mai 2019) | 18 lignes

Fixed: Product content management screen doesn't validate trusted users' input
(OFBIZ-10054)

Steps to recreate:
1) go to (authenticate with admin/ofbiz):
https://localhost:8443/catalog/control/EditProductContent?productId=WG-1111

2) set the content of the field labeled "Large Image" to:
non_existent.foo" onerror="alert('Hi!');

3) visit the url:
https://localhost:8443/ecommerce/control/product?product_id=WG-1111

A popup message will appear with the "Hi!".

jleroux: This is fixed by preventing any js event to be passed 

Thanks: Loris Nardo for report, Jacopo and Gregory for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858966 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 06:05:57 +00:00
Mathieu Lirzin 9ba89ba677 Improved: Rewrite ‘CustomPermissivePolicy#matchesEither’ static method
(OFBIZ-10187)

It now uses a lambda expression instead of an anonymous class.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858934 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 17:11:35 +00:00
Mathieu Lirzin c1caad3442 Improved: Add missing ‘synchronized’ modifier
(OFBIZ-11004)

Overriding a synchronized method with a non-synchronized one can
introduce potential runtime concurrency bugs. Since
‘ExtendedProperties#loadFromXML’ is overridding
‘Properties#loadFromXML’ which is synchronized, it is safer to mark it
as synchonized.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858928 13f79535-47bb-0310-9956-ffa450edef68
2019-05-08 15:16:59 +00:00
Jacques Le Roux 7752eb62da "Applied fix from trunk for revision: 1857088"
------------------------------------------------------------------------
r1857088 | mthl | 2019-04-08 00:11:53 +0200 (lun. 08 avr. 2019) | 6 lignes

Fixed: Remove redundant interface declaration (OFBIZ-10910)

‘java.io.ObjectInputStream’ already implements the ‘AutoCloseable’
interface, so there is no need to declare it in
‘SafeObjectInputStream’ which extends this class.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858866 13f79535-47bb-0310-9956-ffa450edef68
2019-05-07 15:00:36 +00:00
Jacopo Cappellato cfc477c22f Applied fix from trunk for revision: 1858539
===

Improved: Replaced permission-service with required-permissions in order to 
perform permission checks in a way that is more consistent with the screen 
permissions set in the ecommerce blog/forum screens.

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858540 13f79535-47bb-0310-9956-ffa450edef68
2019-05-02 13:42:19 +00:00
Jacques Le Roux 29fe76d1ff "Applied fix from trunk for revision: 1858523"
------------------------------------------------------------------------
r1858523 | lektran | 2019-05-02 10:59:11 +0200 (jeu. 02 mai 2019) | 1 ligne

Fixed: Ensure the story field in ordermgr's EditCustRequest form is html encoded (OFBIZ-11006)

Fixes CVE-2019-10074
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858531 13f79535-47bb-0310-9956-ffa450edef68
2019-05-02 11:53:13 +00:00
Jacques Le Roux 8ed4fd5279 "Applied fix from trunk for revision: 1858444 "
------------------------------------------------------------------------
r1858444 | jleroux | 2019-04-30 18:23:56 +0200 (mar. 30 avr. 2019) | 34 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

This error happens in many occasions:
Inside another request (eg LookupProduct)
Of after a request (eg login)

It shows only in log and have no effect on UI. Notably the new feature normally 
showing an error message in trunk (OFBIZ-10753) does not shows

It happens in all supported releases. IIRW it always happened, only URLs like 
https://demo-trunk.ofbiz.apache.org/images/defaultImage.jpg work. 
But here it's different because we don't need to call 
https://demo-trunk.ofbiz.apache.org/images by hand to get the issue in log.

So it's not very bad since it's has no side effects, just weird and annoying. 
Because it might hide something undetected yet...

This issue does not appear in R15, a good place to test is for instance 
ordermgr/control/request. 
There cal.gif is called by /images/cal.gif and it works (the images appears) 
but in more recent versions the call is also done to 
/ordermgr/control/images/cal.gif where it fails. 
This 1st appears in ControlFilter in the stack trace.

As said Deepak Dixit:
I think we need to fix the image url in css file, it should start with /images, 
else browser append this in request info. There is nothing related to java or 
tomcat code. 

This is a 1st commit for the errors I already reported and I'm sure about

Thanks: Deepak 
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858445 13f79535-47bb-0310-9956-ffa450edef68
2019-04-30 16:25:31 +00:00
Jacopo Cappellato e7b4322ed0 Applied fix from trunk for revision: 1858432
===

[Fixed]: Added permission checks to three blog/forum services; improved the 
configuration for the "add article forum" form (the source tab is not needed in 
the ecommerce application).

Fixes CVE-2019-10073

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858436 13f79535-47bb-0310-9956-ffa450edef68
2019-04-30 14:48:30 +00:00
Michael Brohl bb9d58f13e Fixed: OWASP sanitizer breaks proper rendering of HTML code
(OFBIZ-10187)

This makes the sanitizing enabled/disabled by configuration and enhances
the functionality to support custom sanitizer policies. A reasonable 
example policy class is also included.

Thanks Dennis Balkir for reporting and providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858353 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 09:40:15 +00:00
Michael Brohl ef6ec58bb6 Applied fix from trunk for revision: 1858347
===

Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The default host is now retrieved using the API instead of simply
retrieving the 1st host through Tomcat.getHost().


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858348 13f79535-47bb-0310-9956-ffa450edef68
2019-04-29 08:48:54 +00:00
Swapnil Mane 8e9ed5c5d9 Applied fix from trunk for revision: 1858319
===

Fixed: createProductFeature service ignoring passed productFeatureId parameter
(OFBIZ-10958)

In the change, used override tag instead of attribute.
And set the optional true in INOUT mode for productFeatureId.
But since we are using entity-auto productFeatureId will be always available (either user provide it and if not passed by the user,  system will autogenerate it), thus it will be always OUT.

Additional Notes:

Here we can't make a changes mentioned below, because, for *optional* field's value, invokeCreate method (internally calling isIn and IsOut methods of ModelParam) of EntityAutoEngine.java consider the attribute (override) defined at last for parameters with the same name.

i.e. for below example,  optional value for productFeatureId for mode IN  will be false (but it is defined true)

{code}
<override name=productFeatureId type=String mode=IN optional=true/>
<override name=productFeatureId type=String mode=OUT optional=false/>
{code}

Due to this, isSinglePkIn (in invokeCreate method) field got false value, and the system will auto-generate the productFeatureId and ignore the user's input.

Similarly, we can't write in this way
{code}
<override name=productFeatureId type=String mode=OUT optional=false/>
<override name=productFeatureId type=String mode=IN optional=true/>
{code}

Because in this case, isSinglePkOut (in invokeCreate method) field got false value, and again the system will auto-generate the productFeatureId and ignore the user's input. 

Thanks:  Ulrich Heidfeld for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858320 13f79535-47bb-0310-9956-ffa450edef68
2019-04-28 11:57:08 +00:00
Jacques Le Roux 148d74ff42 "Applied fix from trunk for revision: 1858275 "
------------------------------------------------------------------------
r1858275 | jleroux | 2019-04-27 15:33:44 +0200 (sam. 27 avr. 2019) | 18 lignes

Fixed: Display of entities in text input field for Product Name
(OFBIZ-10356)

In the url:  catalog/control/EditProductContent?productId=GZ-1006-1
the "Product Name" under "Override Simple Fields" is unnecessarily
expressed in entity format . The string displayed in product name
field is:

"Open Gizmo &#x28;LGPL&#x29;" 

it could have been a
simple "Open Gizmo (LGPL)"

jleroux: this was due to OFBIZ-248 when StringUtil.wrapString() was not yet 
available (IIRW)

Thanks: Rajesh Kumar Mallah for report, Swapnil M Mane for discussion, and
Ankit Joshi for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858276 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 13:34:32 +00:00
Suraj Khurana 622e8c260b Applied fix from trunk for revision: 1858256
===

Fixed: Unable to add survey product to cart in order entry form.
(OFBIZ-10735)
It was due to incorrect usage of param map, used UtilHttp.getCombinedMap instead with some code improvements.
Thanks Amit Gadaley for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858258 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 09:00:20 +00:00
Suraj Khurana 8c1c42eaca Applied fix from trunk for revision: 1858250
===

Fixed: Customer Party getting set as 'organizationPartyId' in one the Account transaction for Customer return invoice.
(OFBIZ-10856)
Thanks Chinmay Patidar for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858251 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 07:17:54 +00:00
Jacques Le Roux 6de3a2e4e5 "Applied fix from trunk for revision: 1858180"
------------------------------------------------------------------------
r1858180 | jleroux | 2019-04-26 10:33:30 +0200 (ven. 26 avr. 2019) | 17 lignes

Reverted: Unknown request [images]; this request does not exist or cannot be 
called directly.
(OFBIZ-10895)

Partially revert r1858094, just replaces "rmaps == null" by "rmaps.isEmpty()"

As Mathieu mentioned in dev:
<<Checking for ‘null’ here is not a solution since ‘resolveURI’ contract
it to return a non-nullable collection.
This commit is only bypassing the error handling.>>

As I said in r1858094:
<<This has been somehow broken by OFBIZ-10438 but actually it was already broken 
before but not for the same reason.>>

We need now to review/check how it worked in R15 where it's OK, and possibly 
implements the same
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858181 13f79535-47bb-0310-9956-ffa450edef68
2019-04-26 08:34:36 +00:00
Jacques Le Roux 7d5cb68a09 "Applied fix from trunk for revision: 1858092"
------------------------------------------------------------------------
r1858092 | jleroux | 2019-04-25 10:25:30 +0200 (jeu. 25 avr. 2019) | 14 lignes

Fixed: Unknown request [images]; this request does not exist or cannot be called 
directly.
(OFBIZ-10895)

This has been somehow broken by OFBIZ-10438 but actually it was already broken 
before but not for the same reason. Finally r1838081 (for OFBIZ-10438) allows to 
easy fix it when in previous versions (pre R18) it would need another fix. 
Since it's only annoying text in log I'll let users search the solution for 
pre R18 versions and will fix it only for trunk and R18.

Replaces rmaps.isEmpty() by rmaps == null as it was before R16 (R15 has not this
issue)
Also includes Eclipse automated imports sorting

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858094 13f79535-47bb-0310-9956-ffa450edef68
2019-04-25 08:26:07 +00:00
Swapnil Mane 626fb28672 Applied fix from trunk for revision: 1858035
===

Fixed: Parameters are not available to the next response type when form of enctype=multipart/form-data type is submitted
(OFBIZ-10833)

Reason: The UtilHttp.getMultiPartParameterMap method is used to get the parameters in case of multipart/form-data type.
The getMultiPartParameterMap parse the request to get the parameters.

{code}
uploadedItems = UtilGenerics.<FileItem>checkList(upload.parseRequest(request));
{code}

As per the Apache commons-fileupload guideline, a request can only be parsed once [1]. So, for the next response, again the same getMultiPartParameterMap method is executed (with the same request object), and no parameters are found, since, the request is already parsed.

Also, have a look at the StackOverflow question [2], it also contains related information.

Fix for the issue:
Set the consumed parameters (except uploaded file(s)) in the request attribute so that it will be available to the next response.
The uploaded file(s) are not set in request attribute again to avoid unnecessary memory consumption, also it makes no sense to traverse the uploaded file in the request.

[1] http://commons.apache.org/proper/commons-fileupload/faq.html#empty-parse

[2] https://stackoverflow.com/questions/13881272/servletfileuploadparserequestrequest-returns-an-empty-list

Thanks: Ingo Wolfmayr for reporting issue and Jacques Le Roux for review.



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1858036 13f79535-47bb-0310-9956-ffa450edef68
2019-04-24 10:05:12 +00:00
Gil Portenseigne b953755bc6 Fixed: User depersonation do not clean out impersonated user session.
(OFBIZ-10942)

Thank you Leila Mekika for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857992 13f79535-47bb-0310-9956-ffa450edef68
2019-04-23 07:31:29 +00:00
Mathieu Lirzin 50310c5703 Fixed: Ensure that ‘MapContext’ preserves insertion order properties
(OFBIZ-10933)

This fixes a regression introduced in revision 1837462.

When pushing a ‘LinkedHashMap’ inside a ‘MapContext’, the iteration
order of the ‘MapContext’ values was not corresponding to the
insertion order of the embedded ‘LinkedHashMap’ which is important in
the ‘ControllerConfig’ case where configuration elements are stored in
‘LinkedHashMap’ objects and the ‘include’ mechanism relies on
‘MapContext’.

To avoid such regression in the future, a test reproducing the bug has
been added.

Thanks: Gil Portenseigne for investigating.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857820 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 15:29:52 +00:00
Mathieu Lirzin b8f0d689d1 Improved: Add ‘UtilMisc#toMap(Supplier<Map<K, V>>, Object...)’
(OFBIZ-10933)

It is convenient to use ‘UtilMisc#toMap’ to create pseudo-literal
maps. Previously it was not possible to specify the concrete class of
the constructed map.  The ‘UtilMisc#toMap(Supplier<Map<K, V>>,
Object...)’ overload now provides a convenient way to instantiate
specific map types like ‘LinkedHashMap’ objects.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857819 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 15:26:54 +00:00
Swapnil Mane 0b8740fb70 Applied fix from trunk for revision: 1857813
===

Fixed: If the picklist cancelation process failed, the picklist item shouldn't be marked as cancel
(OFBIZ-4690)

When a transaction is running in which Picklist entity is updated (i.e. canceled), now if the transaction is rollback the picklist status will not be changed but as per previous code, the picklist item's status will get updated i.e. marked as cancel because we called the cancelPicklistAndItems service in async mode

So the situation here was the Picklist is not canceled, but the Picklist items were marked as cancel.

Thus to fix it, call the cancelPicklistAndItems service in sync mode.

Thanks:  Jacques Le Roux for your thoughts.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857814 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 14:08:07 +00:00
Paul Foxworthy 5dbc0f914b Fixed: Updating an OrderItem loses supplierProductId
(OFBIZ-10932)

When you edit on order item, the details are reloaded into a shopping cart
and after editing the order is updated from the cart. The supplierProductId
for the order item is now read into the cart so won't be lost.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857784 13f79535-47bb-0310-9956-ffa450edef68
2019-04-19 05:51:31 +00:00
Jacques Le Roux 5434c98fd1 "Applied fix from trunk for revision: 1857692"
------------------------------------------------------------------------
r1857692 | jleroux | 2019-04-17 18:19:00 +0200 (mer. 17 avr. 2019) | 5 lignes

Fixed: Stores can't be modified at ofbizsetup/control/updateProductStore
(OFBIZ-10930)

Same than parent issue (OFBIZ-10567) but in ofbizsetup component (which should 
have been names setup BTW, I created a setup component for that in Jira)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857693 13f79535-47bb-0310-9956-ffa450edef68
2019-04-17 16:19:27 +00:00
Nicolas Malin 2a6a5ff07a Fixed: Backport, Duplicate a ShoppingCartItem didn't propage OrderItemAttributes
(OFBIZ-10929)

When you clone a ShoppingCartItem by constructor :
    ShoppingCartItem sci = new ShoppingCartItem(ShoppingCartItem item)

The ShoppingCartItem.orderItemAttributes wasn't propage from origin.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857658 13f79535-47bb-0310-9956-ffa450edef68
2019-04-16 19:30:23 +00:00
Deepak Dixit 034bbd8548 Applied fix from trunk for revision: 1857617
===

Fixed: Wrong permission check in ProductScreens#FindProduct
(OFBIZ-10925)
Thanks Dennis Balkir for your contribution

The permission service acctgAgreementPermissionCheck is used in the screen FindProduct in ProductScreens.xml. 
This doesn't really make sense, since there is no connection to the accounting application here.
There was the service productGenericPermission which could have been used instead, 
but this one calls the simple-method checkProductRelatedPermission, 
which then check for the CATALOG permission. Since this is already done in the CommonProductDecorator before, it would not make any sense to do this a second time.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857619 13f79535-47bb-0310-9956-ffa450edef68
2019-04-16 06:02:40 +00:00
Nicolas Malin b2240c2551 Fixed: Backport Update an order linked to an other order lost relation applications/order/
(OFBIZ-10926)
When you edit an order linked to an other order like drop shipment process, shopping cart lost the connexion.
The problem came from ShoppingCart.makeAllOrderItemAssociations() function that prepared all generic value OrderItemAssoc without toOrderId.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857606 13f79535-47bb-0310-9956-ffa450edef68
2019-04-15 22:14:41 +00:00
Jacques Le Roux 814d98796d Fixed: Update Tomcat to 9.0.18 due to CVE-2019-0232
(OFBIZ-10920)

CVE-2019-0232 Apache Tomcat Remote Code Execution on Windows

Severity: Important

Vendor: The Apache Software Foundation

Versions Affected:
Apache Tomcat 9.0.0.M1 to 9.0.17
Apache Tomcat 8.5.0 to 8.5.39
Apache Tomcat 7.0.0 to 7.0.93

Description:
When running on Windows with enableCmdLineArguments enabled, the CGI
Servlet is vulnerable to Remote Code Execution due to a bug in the way
the JRE passes command line arguments to Windows. The CGI Servlet is
disabled by default. The CGI option enableCmdLineArguments is disabled
by default in Tomcat 9.0.x (and will be disabled by default in all
versions in response to this vulnerability). For a detailed explanation
of the JRE behaviour, see Markus Wulftange's blog [1] and this archived
MSDN blog [2].

Mitigation:
Users of affected versions should apply one of the following mitigations:
- Ensure the CGI Servlet initialisation parameter enableCmdLineArguments
    is set to false
- Upgrade to Apache Tomcat 9.0.18 or later when released
- Upgrade to Apache Tomcat 8.5.40 or later when released
- Upgrade to Apache Tomcat 7.0.93 or later when released
This announcement is being made before the releases are available as the
change to fix this issue is obviously security related.

Credit:
This issue was identified by an external security researcher and
reported to the Apache Tomcat security team via the bug bounty program
sponsored by the EU FOSSA-2 project.


jleroux: actually Tomcat 9.0.19 was released, here it is

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857587 13f79535-47bb-0310-9956-ffa450edef68
2019-04-15 14:42:28 +00:00
Jacques Le Roux cbab9e6a45 "Applied fix from trunk for revision: 1857099"
------------------------------------------------------------------------
r1857099 | jleroux | 2019-04-08 11:17:55 +0200 (lun. 08 avr. 2019) | 12 lignes

Improved: Using try-with-resources with File IO Objects.
(OFBIZ-9855)

Uses try with resources for File IO objects like ObjectInputStream and other 
objects. File classes have the AutoCloseable interface.

jleroux: this is only a part of the 2nd patch. The 1st patch will be committed
soon too...

All tests pass

Thanks: Pradhan Yash Sharma
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857486 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 17:50:10 +00:00
Rishi Solanki b6869ff3e6 [Fixed] Incorrect decorator being used over view all promotions and view promotion details screen causing back navigation. Change the decorator name on the showAllPromotions and showPromotionDetails screens. Now user can go back after navigating to both screens.
Merge from trunk revision 1856627.
(OFBIZ-10859)
Thanks to Ratnesh Upadhyay for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857478 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 13:21:51 +00:00
Nicolas Malin b4a6a2b0e4 Fixed: Backport, Escape potential NPE when call DataEvents.serverImage by mocked request
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857459 13f79535-47bb-0310-9956-ffa450edef68
2019-04-13 09:29:53 +00:00
Jacques Le Roux 4d43921f7f Fixed: ‘./gradlew generateOfbizDocumentation’ fails with Gradle 5.0
(OFBIZ-10693)

Reverts 1857431, better stay as is. It works in trunk but not here.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857432 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 20:42:38 +00:00
Jacques Le Roux 40f07f4929 Fixed: ‘./gradlew generateOfbizDocumentation’ fails with Gradle 5.0
(OFBIZ-10693)

We were still waiting for a definitive solution and fortunately it works with 
version 2.0.0 of asciidoctor-gradle-plugin

Thanks: Mathieu for discussion and Jinghai for the fix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857431 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 20:16:46 +00:00
Jacques Le Roux 07445e768d "Applied fix from trunk for revision: 1857392 "
------------------------------------------------------------------------
r1857392 | jleroux | 2019-04-12 11:29:03 +0200 (ven. 12 avr. 2019) | 14 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

Cleans and simplifies things in UtilObject.java and also handles patterns. 
That's what we missed most when needing to update.

Fixes typos in SafeObjectInputStream class and add a commented line for a WIP in
resolveProxyClass method

Also includes work done in UtilObject.java for OFBIZ-9855 
"Using try-with-resources with File IO Objects."



------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857393 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 09:29:47 +00:00
Jacques Le Roux bd7cae3974 Documented:
(OFBIZ-10757)

As discussed on dev ML (https://markmail.org/message/wgy6cjzhv5auy52q) 
we need to inform users about the consequences of keeping on using Oracle Java.
We also suggest to use adoptopenjdk instead of Oracle JDK

Thanks to all who discussed on dev ML 

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857381 13f79535-47bb-0310-9956-ffa450edef68
2019-04-12 08:43:01 +00:00
Jacques Le Roux 30234f4a13 "Applied fix from trunk for revision: 1857213"
------------------------------------------------------------------------
r1857213 | jleroux | 2019-04-09 17:31:50 +0200 (mar. 09 avr. 2019) | 4 lignes

Fixed: Quick Add button for shopping list on Orderentry screen is not working
(OFBIZ-9908)

Fixes typos introduced with previous commit
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857214 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 15:33:05 +00:00
Jacques Le Roux 8021a65670 "Applied fix from trunk for revision: 1857180"
------------------------------------------------------------------------
r1857180 | jleroux | 2019-04-09 13:58:22 +0200 (mar. 09 avr. 2019) | 19 lignes

Fixed: Quick Add button for shopping list on Orderentry screen is not working
(OFBIZ-9908)

Steps to generate
1. Navigate to https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderentry
2. Press continue on sales order screen.
3. Add any finished good product to the sales order
4. In 'Add Order Items to Shopping List' section, select 'new shopping list' 
   from the drop down and click on 'Add to shopping list' button
5. you navigate to 'addBulkToShoppingList' screen, click on 'Quick Add' button.
Issue: The quick add button is not working.

jleroux: as suggested by Ankush: "One of possible workaround is calling 
createShoppingList with new transaction to resolve this deadlock issue."

This just does that for every calls.

Thanks: Garima jain for report, Rohit Hukkeri for discussion and Ankush Upadhyay 
for fix suggestion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857181 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 11:58:55 +00:00
Jacques Le Roux 726b22f30b "Applied fix from trunk for revision: 1857173 "
------------------------------------------------------------------------
r1857173 | jleroux | 2019-04-09 13:49:10 +0200 (mar. 09 avr. 2019) | 8 lignes

Fixed: Error message is displayed while click on create new quotes.
(OFBIZ-10882)

This feature has been removed with OFBIZ-10882, 

This removes the "Create New Quote" link, the redundant "Save" link (there is a 
Save button) and the OrderCreateQuoteFromShoppingList label which was only used 
there
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857174 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 11:51:03 +00:00
Jacques Le Roux 64312abd68 "Applied fix from trunk for revision: 1857154"
------------------------------------------------------------------------
r1857154 | jleroux | 2019-04-09 12:11:16 +0200 (mar. 09 avr. 2019) | 3 lignes

Improved: no functional change

Adds a missing ASL2 header
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857155 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 10:11:40 +00:00
Jacques Le Roux 6db0b552af "Applied fix from trunk for revision: 1857152"
------------------------------------------------------------------------
r1857152 | jleroux | 2019-04-09 12:09:15 +0200 (mar. 09 avr. 2019) | 19 lignes

Fixed: Terminal automatically scrolls down on never ending tasks with the new 
console
(OFBIZ-10915)

Since we use Gradle 5.0 we have this issue, at least in Windows, It's known by 
the Gradle Community 

They suggest to pass --console plain to the command and some others suggest to 
add org.gradle.console=plain to gradle.properties file which is IMO a better 
(less invasive) solution.

I tested in Ubuntu and the problem does not occur there. I don't know for other 
*nix distributions.

Anyway, IMO there is also another advantage: you don't see a percentage in 
console, often confusing for newbies. 

That's why I prefer to add a gradle.properties file rather than modifying the 
gradlew.bat file (both works in WIndows).
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1857153 13f79535-47bb-0310-9956-ffa450edef68
2019-04-09 10:10:00 +00:00
Nicolas Malin 187c035b2b Fixed: When add item on shopping cart, we lost orderItemAttributes
(OFBIZ-10906)
Backport: When you add an item on the cart with some orderItemAttributes with the function

    /** add rental (with accommodation) item to cart and order item attributes*/
    public int addOrIncreaseItem(...too long...)

OrderItemAttributes didn't throw to the second function and we lost them.
Thanks to Leila Mekika to found it.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856881 13f79535-47bb-0310-9956-ffa450edef68
2019-04-03 14:46:32 +00:00
Jacques Le Roux 5792a6b13f "Applied fix from trunk for revision: 1856667 "
------------------------------------------------------------------------
r1856667 | jleroux | 2019-03-31 11:14:16 +0200 (dim. 31 mars 2019) | 10 lignes

Fixed: EmailServices.sendMail causes a NPE, when sendFrom is missing
(OFBIZ-10706)

I tried to find the history for why the service does not take the 
defaultFromEmailAddress property from general.properties and I found that It was 
last modified in revision r418498 on 02/07/2006, I think it was always broken.

This uses defaultFromEmailAddress property in sendMail if sendFrom is missing

Thanks: Benjanmin Jugl reported, Pawan Verma fixed and others for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856668 13f79535-47bb-0310-9956-ffa450edef68
2019-03-31 09:16:51 +00:00
Suraj Khurana 38957c02c1 Applied fix from trunk for revision: 1856617
===

Fixed: Error message is populating while clicking on product barcode.
(OFBIZ-10743)
Used code128 to generate product barcode.
Thanks Ashish Sharma for reporting, everyone who participated in discussion and Pawan Verma for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856619 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 12:44:45 +00:00
Aditya Sharma b1d0b606c6 Applied fix from trunk for revision: 1856613
===

Added: Unit test case for service - createProductFeatureType
(OFBIZ-9089)
Slightly modified patch. Improved class name and file name.
Thanks Pradhan Yash Sharma for reporting and initial patch & Yogesh Naroliya for providing updated patch


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856614 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 09:38:44 +00:00
Aditya Sharma d1915a3810 Applied fix from trunk for revision: 1856610
===

Improved: Replace Inline js with External js in renderDropDownField macro.
(OFBIZ-9849)
Silghtly modified patch as Specify-other Dropdown field were not working. Refactored code in combobox.js file
Thanks Dhaval Wagela for the initial patch


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856611 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 08:03:53 +00:00
Swapnil Mane 92da7eed06 Applied fix from trunk for revision: 1856598
===

Fixed: Missing oldStatusId in error when no status valid change record found
(OFBIZ-10377)

In the case of entity auto service, when an invalid status change is performed, the error message doesn't show the current status of the item from which the user is changing the status.

Thanks:  Lalit Dashora for reporting the issue and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856599 13f79535-47bb-0310-9956-ffa450edef68
2019-03-30 05:47:34 +00:00
Gil Portenseigne d4d5751541 Fixed: Switch ftpNotificationEnabled test condition to respect configuration meaning
(OFBIZ-10245)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856542 13f79535-47bb-0310-9956-ffa450edef68
2019-03-29 14:18:23 +00:00
Jacques Le Roux afe6e8ad20 "Applied fix from trunk for revision: 1856484"
------------------------------------------------------------------------
r1856484 | jleroux | 2019-03-28 16:36:13 +0100 (jeu. 28 mars 2019) | 13 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Ed Mack
This adds 
org.apache.ofbiz.widget.model.ModelTheme
java.util.Collections 
java.util.LinkedList 
java.util.ArrayList
java.util.TimeZonz


Thanks: Ed Mack at OFBIZ-10876
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856485 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 15:37:07 +00:00
Jacques Le Roux d3669f8166 "Applied fix from trunk for revision: 1856460"
------------------------------------------------------------------------
r1856460 | jleroux | 2019-03-28 09:30:21 +0100 (jeu. 28 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

There was a recurring typo in previous commit.
For arrays of primitives it should be 
"\\[Z","\\[B","\\[S","\\[I","\\[J","\\[F","\\[D","\\[C"
and not 
"[Z","[B","[S","[I","[J","[F","[D","[C"
It shows how tired I'm :/

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856461 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 08:30:57 +00:00
Jacques Le Roux 2f39797e50 "Applied fix from trunk for revision: 1856455"
------------------------------------------------------------------------
r1856455 | jleroux | 2019-03-28 08:50:32 +0100 (jeu. 28 mars 2019) | 7 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Ed Mack
This adds all arrays of primitives and java.math.BigDecimal 

Thanks: Ed Mack at OFBIZ-10876
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856456 13f79535-47bb-0310-9956-ffa450edef68
2019-03-28 07:52:06 +00:00
Jacques Le Roux 181da99a6a "Applied fix from trunk for revision: 1856405"
------------------------------------------------------------------------
r1856405 | jleroux | 2019-03-27 15:16:24 +0100 (mer. 27 mars 2019) | 12 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.math.BigDecimal and "[B" (ie [B == byte[] and I don't understand
why in this case "byte[]" does not work)

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Ingo Wolfmayr at OFBIZ-10870
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856406 13f79535-47bb-0310-9956-ffa450edef68
2019-03-27 14:25:01 +00:00
Jacques Le Roux a3c807a225 "Applied fix from trunk for revision: 1856212 "
------------------------------------------------------------------------
r1856212 | jleroux | 2019-03-25 18:47:52 +0100 (lun. 25 mars 2019) | 9 lignes

Fixed: Update Tomcat to 9.0.16 due to CVE-2019-0199
(OFBIZ-10873)

The HTTP/2 implementation accepted streams with excessive numbers of
SETTINGS frames and also permitted clients to keep streams open without
reading/writing request/response data. By keeping streams open for
requests that utilised the Servlet API's blocking I/O, clients were able
to cause server-side threads to block eventually leading to thread
exhaustion and a DoS.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1856213 13f79535-47bb-0310-9956-ffa450edef68
2019-03-25 17:50:09 +00:00
Swapnil Mane fe50928e44 Applied fix from trunk for revision: 1855898
===

Improved: Moved the nodeType check after node.getTextContent() method call
(OFBIZ-10832)

Since most nodes will contain text then it will be more efficient to do a null check after retrieving nodeValue.

Thanks: Scott for your valuable inputs.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855899 13f79535-47bb-0310-9956-ffa450edef68
2019-03-20 12:17:51 +00:00
Deepak Dixit 21e84e2efe Applied fix from trunk for revision: 1855501
===

Improved: Added line separator while while generating svn/git info footer.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855502 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 09:33:52 +00:00
Deepak Dixit 4117e0580d Applied fix from trunk for revision: 1855497
===

Reverted: Changes done at r#1854306, Removed the extra space from CommonBranch uiLabel values


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855498 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 09:26:30 +00:00
Jacques Le Roux 8badcf709b "Applied fix from trunk for revision: 1855492"
------------------------------------------------------------------------
r1855492 | jleroux | 2019-03-14 09:28:27 +0100 (jeu. 14 mars 2019) | 11 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.util.Date

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Wolfgang Rauchholz
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855493 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 08:28:47 +00:00
Jacques Le Roux f772c0596d "Applied fix from trunk for revision: 1855488"
------------------------------------------------------------------------
r1855488 | jleroux | 2019-03-14 08:42:17 +0100 (jeu. 14 mars 2019) | 11 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Wolfgang Rauchholz on user
ML 
This adds java.sql.Timestamp

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Wolfgang Rauchholz
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855489 13f79535-47bb-0310-9956-ffa450edef68
2019-03-14 07:43:15 +00:00
Swapnil Mane f01e4cf67c Applied fix from trunk for revision: 1855403
===

Fixed: simpleTypeConvert always returns Null for Document, Document Type and Notation Node 
(OFBIZ-10832)

As per the code, getTextContent() method is used get text content of the node and its descendants but the node.getTextContent() always return Null for the following Node type
DOCUMENT_NODE, DOCUMENT_TYPE_NODE, NOTATION_NODE [1]

Since we can't get the text value of Document, Document Type and Notation Node, thus simply return the same object.

[1] https://docs.oracle.com/javase/7/docs/api/org/w3c/dom/Node.html#getTextContent()

Thanks: Deepak Dixit for reviewing the code.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855408 13f79535-47bb-0310-9956-ffa450edef68
2019-03-13 12:34:45 +00:00
Jacques Le Roux 8dc982f2b3 "Applied fix from trunk for revision: 1855371"
------------------------------------------------------------------------
r1855371 | jleroux | 2019-03-13 09:19:32 +0100 (mer. 13 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Deepak at OFBIZ-10837
This adds sun.util.calendar.ZoneInfo

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Deepak Dexit
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855372 13f79535-47bb-0310-9956-ffa450edef68
2019-03-13 08:20:02 +00:00
Jacques Le Roux cd6625491b "Applied fix from trunk for revision: 1855287"
------------------------------------------------------------------------
r1855287 | jleroux | 2019-03-12 09:29:37 +0100 (mar. 12 mars 2019) | 10 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list was still not complete as reported by Rohit at OFBIZ-10573
This adds FlexibleStringExpander

It seems the warning in SafeObjectInputStream::resolveClass is not enough. 
Anyway I'll not change it.

Thanks: Rohit Koushal
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855288 13f79535-47bb-0310-9956-ffa450edef68
2019-03-12 08:30:01 +00:00
Aditya Sharma d3c0d2b81a Applied fix from trunk for revision: 1855083
===

Improved: Replace document.write() occurrences with some legitimate code
(OFBIZ-10759)
Removed js code and added Js files in LookupDecorator.
Added Js library files as there were some errors in console logs


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855087 13f79535-47bb-0310-9956-ffa450edef68
2019-03-09 06:36:14 +00:00
Suraj Khurana a7cf6ee041 Applied fix from trunk for revision: 1855078
===

Fixed: Service failed to mark expired authorized payments of Authorize.net as void.
(OFBIZ-10727)
Thanks Amit Gadaley for reporting the issue and providing the patch, thanks Jacopo for discussion and feedback.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1855081 13f79535-47bb-0310-9956-ffa450edef68
2019-03-09 05:32:39 +00:00
Deepak Dixit 9f3654efff Replaced the deprecated CellType::getCellTypeEnum method call with CellType::getCellType
(OFBIZ-10757)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1854693 13f79535-47bb-0310-9956-ffa450edef68
2019-03-03 10:54:17 +00:00
Deepak Dixit adeac89d37 Applied fix from trunk for revision: 1854683
===

Preparation for JDK11 update, Updated following code to fix warning with respect to JDK11
- Replaced Class::newInstance occurrences
- Removed deprecated override method Object::finalize
(OFBIZ-10757)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1854689 13f79535-47bb-0310-9956-ffa450edef68
2019-03-03 10:45:02 +00:00
Jacques Le Roux 21cc65d0d9 "Applied fix from trunk for revision: 1854457"
------------------------------------------------------------------------
r1854457 | jleroux | 2019-02-27 14:01:59 +0100 (mer. 27 févr. 2019) | 9 lignes

Fixed: No userLogin given in calculateProductPrice service call context
(OFBIZ-10842)

The call context for calculateProductPrice doesn't contain the userLogin
This is needed in the customPriceCalcService
So currently there's no chance to get the user information in a custom price 
calc service.

Thanks: Danny Trunk for the proposition (I changed the code myself)
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1854458 13f79535-47bb-0310-9956-ffa450edef68
2019-02-27 13:08:23 +00:00
Jacques Le Roux 2e4cd0330a "Applied fix from trunk for revision: 1854306"
------------------------------------------------------------------------
r1854306 | jleroux | 2019-02-25 11:33:53 +0100 (lun. 25 févr. 2019) | 6 lignes

Improved: no functional change

A missing space before CommonBranch label made the word trunkbranch instead of
trunk branch.

I'll backport this
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1854307 13f79535-47bb-0310-9956-ffa450edef68
2019-02-25 10:40:47 +00:00
Jacques Le Roux 2939764ed4 "Applied fix from trunk for revision: 1853750 "
------------------------------------------------------------------------
r1853750 | jleroux | 2019-02-17 13:46:56 +0100 (dim. 17 févr. 2019) | 15 lignes

Fixed: Add To Order button not working on shopping list screen
(OFBIZ-10836)
Steps to generate:

1.Navigate to https://demo-trunk.ofbiz.apache.org/ordermgr/control/orderentry
2.Add any finished good to the order.
3.Select New Shopping List from Add Order Items To Shopping List section.
4.Click on Add To Shopping List.
5.Now Click on Add To Order button ahead of any product in that shopping list.
6.Error message displays on the screen

Thanks: Rohit Hukkeri

jleroux: note that there is another issue popping up when testing this issue.
It's related with  OFBIZ-10418 and maybe OFBIZ-5157
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1853751 13f79535-47bb-0310-9956-ffa450edef68
2019-02-17 12:48:03 +00:00
Jacques Le Roux bd35056b3f "Applied fix from trunk for revision: 1853745 "
------------------------------------------------------------------------
r1853745 | jleroux | 2019-02-17 13:38:06 +0100 (dim. 17 févr. 2019) | 8 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

The white list I used was not complete.
This adds "java.util.HashMap", "Boolean", "Number", "Integer" which are the ones
missing I found so far. 
Maybe other classes could still miss OOTB. So I added a warning in 
SafeObjectInputStream::resolveClass
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1853746 13f79535-47bb-0310-9956-ffa450edef68
2019-02-17 12:39:54 +00:00
Jacques Le Roux b9480dae29 "Applied fix from trunk for revision: 1853691 "
------------------------------------------------------------------------
r1853691 | jleroux | 2019-02-16 10:42:03 +0100 (sam. 16 févr. 2019) | 9 lignes

Improved: Improve ObjectInputStream class
(OFBIZ-10837)

Fixes CVE-2019-0189

As reported by FindBugs and Sonar, it's troubling (a Bad practice in Sonar[1], 
a code smell in Findbugs[2]) when extending to use the same name than the 
extended Object

[1] https://sbforge.org/sonar/rules/show/findbugs:NM_SAME_SIMPLE_NAME_AS_SUPERCLASS?layout=false
[2] https://logging.apache.org/log4j/log4j-2.2/log4j-jul/findbugs.html
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1853692 13f79535-47bb-0310-9956-ffa450edef68
2019-02-16 09:43:39 +00:00
Swapnil Mane b152eaa25d Applied fix from trunk for revision: 1853109
===

Improved: Made the ecomThemeId field optional, since it is not the part of PK 
(OFBIZ-10567)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1853111 13f79535-47bb-0310-9956-ffa450edef68
2019-02-07 04:20:15 +00:00
Jacques Le Roux 982909093c "Applied fix from trunk for revision: 1853070"
------------------------------------------------------------------------
r1853070 | jleroux | 2019-02-06 13:52:20 +0100 (mer. 06 févr. 2019) | 13 lignes

Fixed: URL not encoding in FTL 
(OFBIZ-10816)

I have created Product as TEST#01 in demo site and attached the Same to category 
101. In the category master searched for category 101 went to product tab, when 
I am trying to open a product master, link is generated like and asking for 
creating new product. But in product search and menu click is working fine 
problem is from ftl url are not getting encoded...Don`t know whats happening on 
FTL printing.... 

jleroux: fixes also catalog/control/EditProduct?productId=test%2301 (for test#1)

Thanks: Murugeswari for report and Pawan Verma for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1853073 13f79535-47bb-0310-9956-ffa450edef68
2019-02-06 12:53:49 +00:00
Michael Brohl be5f4bddb6 Applied fix from trunk for revision: 1852882
===

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
2019-02-04 09:26:42 +00:00
Michael Brohl 8bdb9c4945 Applied fix from trunk for revision: 1849931
===

Improved: Token Based Authentication
(OFBIZ-9833)

Just few typos and import ordering while reviewing for OFBIZ-4361


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852883 13f79535-47bb-0310-9956-ffa450edef68
2019-02-04 09:26:12 +00:00
Deepak Dixit a2aa07520d Applied fix from trunk for revision: 1852818
===

Fixed: Html escaping missing for portalPageId parameter of Help button
(OFBIZ-10828)
 Thanks, Niels Heinen of the Google security team for reporting the issue. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852819 13f79535-47bb-0310-9956-ffa450edef68
2019-02-03 09:36:07 +00:00
Arun Patidar 3b5741b919 Applied fix from trunk for revision: 1852587
===

Fixed: Services of EntitySync Push and Pull functionalities
(OFBIZ-10818)

Set transaction timeout of 2hrs for the actual data transmission services.
Removed unwanted service updateEntitySyncRunning
Called the tracking and status update services in new transaction so that record can be maintain after current transaction rollback


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852680 13f79535-47bb-0310-9956-ffa450edef68
2019-02-01 09:00:44 +00:00
Nicolas Malin 1c738446ba Fixed: Disable widget verbose property on context doesn't works for rendering ftl template
Backport from trunk

When OFBiz render a platform specific with a ftl template file, the widget verbosity throw function ModelWidget.widgetBoundary() was called with parameters as context. However this function control if a parameters is already present, so if you set a context.widgetVerbose = false, is was ignored and widget verbosity was present for ftl rendering. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852533 13f79535-47bb-0310-9956-ffa450edef68
2019-01-30 16:20:24 +00:00
Deepak Dixit 0daaa4f83f Applied fix from trunk for revision: 1852503
===

Fixed: Upgrade Apache Tika to 1.20 (CVE-2018-8017/CVE-2018-17197)
In Apache Tika 1.2 to 1.18, a carefully crafted file can trigger an infinite loop in the IptcAnpaParser. 
A carefully crafted or corrupt sqlite file can cause an infinite loop in Apache Tika's SQLite3Parser in versions 1.8-1.19.1 of Apache Tika. 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1852504 13f79535-47bb-0310-9956-ffa450edef68
2019-01-30 08:54:29 +00:00
Jacques Le Roux 191f9272ef "Applied fix from trunk for revision: 1851998"
------------------------------------------------------------------------
r1851998 | jleroux | 2019-01-24 09:17:38 +0100 (jeu. 24 janv. 2019) | 11 lignes

Fixed: Impossible secure and autologin cookie names when mountpoint contains a 
slash inside its name
(OFBIZ-10766)

Deepak Nigam reported on dev ML:
When there is one web app with the empty mount point (i.e. deployed on root), 
the auto-login cookie will not work for that particular webapp due to the change 
in the path of the cookie from "/" to "/" + applicationName. Because the system 
will try to find the cookie at the "/" but it is actually at "/" + applicationName.

Thanks Deepak for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851999 13f79535-47bb-0310-9956-ffa450edef68
2019-01-24 08:19:12 +00:00
Jacques Le Roux d88ffa384b "Applied fix from trunk for revision: 1851885 "
------------------------------------------------------------------------
r1851885 | jleroux | 2019-01-23 08:14:21 +0100 (mer. 23 janv. 2019) | 10 lignes

Fixed: Implemented: Navigate from a domain to another with automated signed in 
authentication
(OFBIZ-10307)

Non functional change

Removes now useless "webappName" var after I put in the SecuredUserLoginId 
cookies.

Thanks: Michael for spotting it in OFBIZ-10814
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851886 13f79535-47bb-0310-9956-ffa450edef68
2019-01-23 07:16:54 +00:00
Arun Patidar 60ae0297c6 Applied fix from trunk for revision: 1851805
===

Fixed: EntitySync Push and Pull functionalities
(OFBIZ-10818)

Removed unneccessary service implementation and used entity-auto
Fixed some create/update code block in the flow


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851881 13f79535-47bb-0310-9956-ffa450edef68
2019-01-23 06:29:03 +00:00
Aditya Sharma 5dffe66301 Applied fix from trunk for revision: 1851500
===

Improved: Replace Inline js with External js in renderTextField macro
(OFBIZ-9844)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851502 13f79535-47bb-0310-9956-ffa450edef68
2019-01-17 08:34:07 +00:00
Aditya Sharma df7ad6d730 Applied fix from trunk for revision: 1851433
===

Improved: Replace Inline js with External js in renderFieldGroupOpen macro
(OFBIZ-9853)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851437 13f79535-47bb-0310-9956-ffa450edef68
2019-01-16 11:53:13 +00:00
Jacques Le Roux e362efdfd9 "Applied fix from trunk for revision: 1851353"
------------------------------------------------------------------------
r1851353 | paulfoxworthy | 2019-01-15 14:53:51 +0100 (mar. 15 janv. 2019) | 11 lignes

Fixed: In packing, only use reservations with stock on hand
(OFBIZ-9677)

During packing, OFBiz looks for reservations (OrderItemShipGrpInvRes)
for the order item. Some reservations are for back ordered items not on hand.
These reservations should not be used during packing, but they are.

Fixed additional problem in r1850914 when a single reservation has a
quantity that exactly matches the quantity to pack.


------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851361 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 14:14:14 +00:00
Jacques Le Roux 6b162efacc "Applied fix from trunk for revision: 1851350"
------------------------------------------------------------------------
r1851350 | jleroux | 2019-01-15 14:48:33 +0100 (mar. 15 janv. 2019) | 7 lignes

Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

As reported by Deepak Nigam on dev ML there was a risk of NPE with userLogin w/
my last commit at r1851074  

Thanks Deepak for the report and proposed fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851351 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 13:48:56 +00:00
Jacques Le Roux abfa515747 "Applied fix from trunk for revision: 1851319"
------------------------------------------------------------------------
r1851319 | jleroux | 2019-01-15 08:43:36 +0100 (mar. 15 janv. 2019) | 12 lignes

Fixed: partyId misses in EditEftAccount.ftl (party) when you create an EFT 
account from the quick finalize page
(OFBIZ-10680)

If you split the payment and want to create an EFT account you get an error in 
EditEftAccount.ftl (party) at line 40 colum 50: the partyId is missing.

Adds the patch to add the partyId field that was missing while creating an EFT 
account or credit card in split payment mode. Added proper checks to avoid the 
broken screen in case the parameter is missing.

Thanks: Ankit Joshi for the fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851320 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 07:44:31 +00:00
Aditya Sharma a097709fbb Applied fix from trunk for revision: 1851315
===

Improved: Replace Inline js with External js in renderDateFindField macro
(OFBIZ-9850)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851317 13f79535-47bb-0310-9956-ffa450edef68
2019-01-15 04:58:24 +00:00
Michael Brohl 3c6afa75f7 Applied fix from trunk for revision: 1851254
===

Fixed: Blank page is displayed on ecommerce
(OFBIZ-10741)

Fixed recursions in hashCode methods introduced wth OFBIZ-9774.

Thanks Arpit Mor for reporting, Jacques Le Roux amd Priya Sharma for
review and helpful hints.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851255 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 14:13:27 +00:00
Jacques Le Roux a816dd1c78 "Applied fix from trunk for revision: 1851247"
------------------------------------------------------------------------
r1851247 | jleroux | 2019-01-14 14:53:18 +0100 (lun. 14 janv. 2019) | 13 lignes

Fixed: User's name is displayed on ecommerce even after user logs out
(OFBIZ-10666)

On further investigation, I found that cookie path and domain are different 
in the methods of creating the auto-login cookie i.e. LoginWorker.autoLoginSet() 
and removing the auto-login cookie i.e. LoginWorker.autoLoginRemove().

After following changes the issue seems to be fixed:
1. Removed getMaxAge() check from the condition used in 
   LoginWorker.getAutoUserLoginId() method.
2. Corrected the path and domain in the method LoginWorker.autoLoginRemove().

Thanks: Deepak Nigam for discussion and fix
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851248 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 13:54:32 +00:00
Aditya Sharma 58e7fbc126 Applied fix from trunk for revision: 1851224
===

Improved: Replace Inline js with External js in renderDateTimeField macro
(OFBIZ-9848)



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851225 13f79535-47bb-0310-9956-ffa450edef68
2019-01-14 05:21:53 +00:00
Jacques Le Roux df2e8c2fa4 "Applied fix from trunk for revision: 1851200"
------------------------------------------------------------------------
r1851200 | jleroux | 2019-01-13 14:31:13 +0100 (dim. 13 janv. 2019) | 11 lignes

Reverted: Impossible secure and autologin cookie names when mountpoint contains 
a slash inside its name
(OFBIZ-10766)

In my previous commit I reverted the initial change. As I said in the Jira
I had a second look and it's better to fix the problem at the root as I did 
initially. 

I wrote in my previous commit: "This method is used in other places where the 
name should not be changed." I checked there are no issues changing slashes to
underscores in the cookies names anywhere.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851201 13f79535-47bb-0310-9956-ffa450edef68
2019-01-13 13:33:23 +00:00
Jacques Le Roux b5f896b369 "Applied fix from trunk for revision: 1850914"
------------------------------------------------------------------------
r1850914 | paulfoxworthy | 2019-01-10 04:32:33 +0100 (jeu. 10 janv. 2019) | 7 lignes

Fixed: In packing, only use reservations with stock on hand
(OFBIZ-9677)

During packing, OFBiz looks for reservations (OrderItemShipGrpInvRes)
for the order item. Some reservations are for back ordered items not on hand.
These reservations should not be used during packing, but they are.

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851163 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 12:52:44 +00:00
Michael Brohl 7c1f341503 Applied fix from trunk for revision: 1851158
===

Fixed: Errors and warnings in webtools' ArtifactInfo
(OFBIZ-10760)

This fixes an engine declaration mistake introduced in OFBIZ-9111, 
removes an unused service which should have been deleted in OFBIZ-8722
and removes unused services which should have been deleted in 
OFBIZ-10146.

Thanks Mathieu Lirzin for reporting and providing the patches.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851159 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 11:27:58 +00:00
Ashish Vijaywargiya e852164403 Applied fix from trunk for revision: 1851147
===========================
Fixed:Product tags section displays 'Update' button, despite of having no results 
(OFBIZ-9642)
Thanks Jagpreet for reporting and Anushi for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851149 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 08:20:48 +00:00
Suraj Khurana 1d7e632a2f Applied fix from trunk for revision: 1851130
===

Fixed:Invoice date is not displayed on findInvoice screen.
(OFBIZ-10620)
When an invoice is created, current date is set as invoice date which can be viewed on FindInvoice screen, it was not rendering due to incorrect xml tag used.
Thanks Arpit Mor for reporting and Deepak Nigam for providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851133 13f79535-47bb-0310-9956-ffa450edef68
2019-01-12 05:35:46 +00:00
Jacques Le Roux 102c192673 "Applied fix from trunk for revision: 1851074 "
------------------------------------------------------------------------
r1851074 | jleroux | 2019-01-11 17:26:13 +0100 (ven. 11 janv. 2019) | 17 lignes

Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

In the method to set the autoLogin cookie, LoginWorker::autoLoginSet,
system fetches the webAppInfo by using the
method ComponentConfig::getWebappInfo. In this method, serverId and
applicationName are passed as arguments.

*WebappInfo webappInfo = ComponentConfig.getWebappInfo((String)
context.getAttribute("_serverId"), UtilHttp.getApplicationName(request));*

If the mount-point of the web app is set as an empty string, then 'root'
will be used as the application name, due to which the object webAppInfo
will come null. If the webAppInfo is null then the autoLogin cookie will
not be created and added to the response object by the system.

Thanks: Aditya for report and Mathieu Lirzin for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851075 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:27:03 +00:00
Jacques Le Roux 01b95971b0 "Applied fix from trunk for revision: 1851068 "
------------------------------------------------------------------------
r1851068 | jleroux | 2019-01-11 17:12:01 +0100 (ven. 11 janv. 2019) | 12 lignes

Fixed: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Following "Session timeout for webapps" discussion on dev ML 
https://markmail.org/message/p6fbiojjrwb2ybxd

We decided to put back the session-timeout value in web.xml files and to remove
the line
    session.setMaxInactiveInterval(60*60); //in seconds
from ControlEventListener.java

Thanks: Deepak Nigam for report and Girish Vasmatkar for discussion
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851070 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:13:09 +00:00
Aditya Sharma 42a27c2b01 Applied fix from trunk for revision: 1851013
===

Improved: Upgrade jQuery 1.11.0 to jQuery 3.2.1
(OFBIZ-9978)
Removed unused jQuery MockJax Plugin.
Thanks Michael Brohl and Jacques Le Roux for the discussion.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851014 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 07:48:02 +00:00
Deepak Dixit 9730ce4357 Applied fix from trunk for revision: 1851006
===

Fixed: Page dropdown list on categorydetail page broken
(OFBIZ-10787)
Thanks Sebastian Wachinger for reporting the issue.
Corrected the condition to display pagination options for ordermgr template as well.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1851007 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 06:08:48 +00:00
Michael Brohl 7ae8f348fa Applied fix from trunk for revision: 1850953
===

Fixed: Failed registration for virtual hosts with similar mount points
(OFBIZ-10765)

The name is now registered with the webbapp name prior to the context.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850954 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 16:07:56 +00:00
Michael Brohl 8b0709f4b1 Applied fix from trunk for revision: 1850948
===

Improved: Wrong German translation in PartyUiLabels
(OFBIZ-10786)

Thanks Dennis Balkir for reporting and providing the patch.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850951 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 15:59:39 +00:00
Aditya Sharma 768bd57099 Applied fix from trunk for revision: 1850921
===

Improved: Upgrade jquery-validation plugin from 1.17.0 to 1.19.0
(OFBIZ-10785)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850923 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 06:15:24 +00:00
Deepak Dixit 3d198091f6 Applied fix from trunk for revision: 1850918
===

Fixed: Unable to add additional product images from catalog
(OFBIZ-10673)
Removed code that was unused after r1081272, as logic to prepare the fileLocation was modified at r1081272
Thanks Rohit Koushal and Ingo Wolfmayr for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850920 13f79535-47bb-0310-9956-ffa450edef68
2019-01-10 06:10:00 +00:00
Aditya Sharma 7604e4295d Applied fix from trunk for revision: 1850711
===

Improved: Replace jQuery.bind() with jQuery.on()
(OFBIZ-10758)
As of jQuery 3.0, .bind() has been deprecated. It was superseded by the .on() method for attaching event handlers to a document.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850713 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 05:16:48 +00:00
Jacques Le Roux 42ffa59a30 "Applied fix from trunk for revision: 1850694"
------------------------------------------------------------------------
r1850694 | jleroux | 2019-01-07 22:58:01 +0100 (lun. 07 janv. 2019) | 13 lignes

Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Michael spotted that I used "default-server" in r1845558:

Quoting him:

    It only works for webapps using "default-server". This name is configurable 
    in the ofbiz-component.xml and and should not be hard-coded in the code. 

This fixes it

Thanks: Michael Brohl
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850695 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 21:59:32 +00:00
Jacques Le Roux de31245d5e "Applied fix from trunk for revision: 1850685"
------------------------------------------------------------------------
r1850685 | jleroux | 2019-01-07 21:37:10 +0100 (lun. 07 janv. 2019) | 8 lignes

Fixed: Impossible secure and autologin cookie names when mountpoint contains a 
slash inside its name
(OFBIZ-10766)

My previous commit was wrong this one fixes it.
I made a mistake trying to generalise changing UtilHttp::getApplicationName. 
This method is used in other places where the name should not be changed. 
Only cookies are concerned.
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850686 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 20:38:26 +00:00
Jacques Le Roux 705d95e9e1 "Applied fix from trunk for revision: 1850647"
------------------------------------------------------------------------
r1850647 | jleroux | 2019-01-07 15:46:50 +0100 (lun. 07 janv. 2019) | 11 lignes

Improved: Update Apache commons-fileupload to last version
(OFBIZ-10770)

Fixes CVE-2019-0189

This is an easy doing, we just need to add

    compile 'commons-fileupload:commons-fileupload:1.3-3'

to the build.gradle file.

So far the dependency was not given directly but by other dependencies

------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850648 13f79535-47bb-0310-9956-ffa450edef68
2019-01-07 14:47:57 +00:00
Jacques Le Roux a51ea1af60 "Applied fix from trunk for revision: 1850530"
------------------------------------------------------------------------
r1850530 | jleroux | 2019-01-06 09:40:38 +0100 (dim. 06 janv. 2019) | 8 lignes

Fixed: Impossible secure and autologin cookie names when mountpoint contains a 
slash inside its name
(OFBIZ-10766)

When you set a mountpoint which contains a slash inside its name 
(ie not only a slash as a trailer, which is possible), as it's needed with 
OFBIZ-10765, OFBiz tries to create a cookie with a slash in its name and 
that's impossible
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850531 13f79535-47bb-0310-9956-ffa450edef68
2019-01-06 08:41:19 +00:00
Aditya Sharma f6c172017c Applied fix from trunk for revision: 1850148
===

Improved: When using Select2 for multiple selects the field is too narrow in 'no results' case
(OFBIZ-10682)
Set width to 50% so that it shows input box of size that accomodates 'No Results' message. 


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850149 13f79535-47bb-0310-9956-ffa450edef68
2019-01-02 05:05:31 +00:00
Jacques Le Roux 5f66b82534 "Applied fix from trunk for revision: 1850023 "
------------------------------------------------------------------------
r1850023 | jleroux | 2018-12-31 10:09:33 +0100 (lun. 31 déc. 2018) | 12 lignes

Improved: Product Promo Worker description patch
(OFBIZ-3907)

Completes initial work from Sascha Rodekamp

Returns promoName then promoText if promoName absent then and 
"No promotion name nor text" if either are present.

We lose the information in promoText but at least it's correctly rendered in 
invoices PDF and accounting component.

Thanks: Scott for report
------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850024 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 09:10:18 +00:00
Jacques Le Roux 9b298ce6d5 "Applied fix from trunk for revision: 1850015"
------------------------------------------------------------------------
r1850015 | jleroux | 2018-12-31 07:38:36 +0100 (lun. 31 déc. 2018) | 16 lignes

Improved: Prepare the migration to XStream 1.5
(OFBIZ-10756)

Fixes CVE-2018-17200

We currently use the UnsupportedClassConverter method in UtilXml class. 
When the 1.5 version of XStream will be available another way to handle this 
kind of things will be available and used by default. It's already possible to 
use the same with the 1.4 version of XStream with its setupDefaultSecurity method.

So this replaces the UnsupportedClassConverter in UtilXml class by 
XStream::setupDefaultSecurity method.

It's an improvement but better to backport it as much as possible

The UtilXmlTests class and its use is removed and the UnsupportedClassConverter 
method deprecated (no use OOTB)


------------------------------------------------------------------------


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1850018 13f79535-47bb-0310-9956-ffa450edef68
2018-12-31 06:51:08 +00:00
Nicolas Malin e57ebea704 Improved: Updated plugins url on release18.12
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1849863 13f79535-47bb-0310-9956-ffa450edef68
2018-12-28 14:42:46 +00:00
Nicolas Malin d4095d7ccf Created feature branch 18.12 for the ofbiz-framework.
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/branches/release18.12@1849861 13f79535-47bb-0310-9956-ffa450edef68
2018-12-28 14:36:11 +00:00
1159 changed files with 45957 additions and 40877 deletions
+41
View File
@@ -0,0 +1,41 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
# Explicitly declare text files to always be normalized and converted
# to native line endings on checkout.
*.java text
*.groovy text
*.jsp text
*.ftl text
*.js text
*.sql text
*.txt text
*.properties text
*.xml text
*.xsl text
*.xsd text
*.html text
*.htm text
*.css text
*.gradle text
*.md text
Makefile text
README text
NOTICE text
LICENSE text
rc.ofbiz.* text
*.less text
*.adoc text
*.sh text
# Declare files that will always have CRLF line endings on checkout.
*.bat text eol=crlf
# Denote all files that are truly binary and should not be modified.
*.png binary
*.jpg binary
*.gif binary
*.tif binary
*.zip binary
*.jks binary
*.ttf binary
+11
View File
@@ -0,0 +1,11 @@
Improved:
Implemented:
Documented:
Completed:
Reverted:
Fixed:
(OFBIZ-)
Explanation
Thanks:
+91
View File
@@ -0,0 +1,91 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
#
name: "CodeQL"
on:
push:
branches: [ trunk, release* ]
paths:
- '**.java'
- '**.js'
pull_request:
# The branches below must be a subset of the branches above
branches: [ release* ]
paths:
- '**.java'
- '**.js'
schedule:
- cron: '27 15 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
#language: [ 'java', 'javascript' ]
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
+42
View File
@@ -0,0 +1,42 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This workflow will check style in OFBiz with its plugins
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ release18.12 ]
pull_request:
branches: [ release18.12 ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew pullAllPluginsSource check
+3 -1
View File
@@ -2,7 +2,7 @@ bin/
build/
applications/*/build
framework/*/build
plugins/
/plugins/
runtime/git-rebase/*
runtime/SvnInfo.ftl
runtime/GitInfo.ftl
@@ -37,3 +37,5 @@ desktop.ini
.*.swp
.*.swo
*.patch
/themes/common-theme/webapp/common/js/node_modules/
/docs/asciidoc/images/
+67
View File
@@ -0,0 +1,67 @@
Welcome to Apache OFBiz! A powerful top level Apache software project. OFBiz
is an Enterprise Resource Planning (ERP) System written in Java and houses a
large set of libraries, entities, services and features to run all aspects of
your business.
== System requirements
The only requirement to run OFBiz is to have the Java Development Kit (JDK)
version 8 installed on your system (not just the JRE, but the full JDK) which
you can download from the below link. Make sure of setting the $JAVA_HOME
environment variable.
https://adoptopenjdk.net/[JDK download]
== Quick start
To quickly install and fire-up OFBiz, please follow the below instructions from
the command line at the OFBiz top level directory (folder).
=== Download the Gradle wrapper:
MS Windows: init-gradle-wrapper
Unix-like OS: ./gradle/init-gradle-wrapper
=== Prepare OFBiz:
==== Clean system and load the complete OFBiz data
_______________________________________________________________________________
Note: Depending on your Internet connection speed it might take a long time
for this step to complete if you are using OFBiz for the first time as it needs
to download all dependencies. So please be patient!
_______________________________________________________________________________
MS Windows: gradlew cleanAll loadAll
Unix-like OS: ./gradlew cleanAll loadAll
=====Note:
As the later step, to install without the demo data follow:
(beware this is for development or production, not trying)
Windows: gradlew cleanAll "ofbiz --load-data readers=seed,seed-initial" loadAdminUserLogin -PuserLoginId=admin
Unix-like OS: ./gradlew cleanAll "ofbiz --load-data readers=seed,seed-initial" loadAdminUserLogin -PuserLoginId=admin
The OFBiz install will be empty, there will be no chart of accounts, no transactions, no products, no customers and no suppliers.
You can't log to the E-Commerce Store. You will get: "A Product Store has not been defined for this ecommerce site. A Product Store can be created using the ofbizsetup wizard."
=== Start OFBiz:
MS Windows: gradlew ofbiz
Unix-like OS: ./gradlew ofbiz
_______________________________________________________________________________
Note: Ignore the % progress indicator because this task does not end as long
as OFBiz is running.
_______________________________________________________________________________
=== Visit OFBiz through your browser:
https://localhost:8443/webtools
== Going further
To complete your installation and use OFBiz please read README.adoc
You may prefer to read this AsciiDoc file in HTML format.
For that simply follow:
https://asciidoctor.org/docs/convert-documents/#converting-a-document-to-html
+11 -53
View File
@@ -186,24 +186,19 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2001-2008 The Apache Software Foundation
Copyright [yyyy] [name of copyright owner]
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=========================================================================
@@ -225,42 +220,5 @@ For details, see themes/common/webapp/common/js/plugins/date/timezones.
=========================================================================
This product bundles "Date Format 1.2.3", which is available
under the "MIT" license.
under the "MIT" license.
For details, see themes/common/webapp/common/js/plugins/date/date.format-1.2.3*
=========================================================================
This product bundles "jQuery" and "jQuery" plugins and extensions, which are available
under the "MIT" license. For details, see:
themes/common/webapp/common/js/jquery
plugins/webpos/webapp/webpos/images/js/jquery.hotkeys-0.7.9.min.js
plugins/webpos/webapp/webpos/images/js/WebPosHotkeys.js
=========================================================================
This product bundles files from the "Birt" technology platform (www.eclipse.org/birt/)
which are available under the "Eclipse Public License - v 1.0".
For details, see plugins/birt/webapp/birt/webcontent/birt/
=========================================================================
This product bundles "Webhelp for DocBook", which is available
under the "MIT" License. For details, see plugins/cmssite/template/docbook/webhelp/
=========================================================================
This product bundles "DocBook XSL Stylesheets 1.77.1", which is available
under the "MIT" license.
For details, see plugins/cmssite/template/docbook/
=========================================================================
This product bundles "Openlayers", which is available
under the "FreeBSD" license.
For details, see themes/common/webapp/images/OpenLayers-2.13.1-modified-for-CSP-.js
=========================================================================
This product bundles "Bootstrap", which is available
under the "MIT" license.
For details, see:
plugins/ecommerce/webapp/ecommerce/js
plugins/ecommerce/webapp/ecommerce/css
+1 -1
View File
@@ -1,5 +1,5 @@
Apache OFBiz
Copyright 2001-2018 The Apache Software Foundation
This product includes software developed by
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
+44 -15
View File
@@ -19,6 +19,19 @@ under the License.
[[apache-ofbiz]]
= Apache OFBiz®
image:https://img.shields.io/badge/License-Apache%202.0-blue.svg[link=http://www.apache.org/licenses/LICENSE-2.0]
image:https://img.shields.io/badge/Version-release18.12-green.svg[link=Version]
image:https://github.com/apache/ofbiz-framework/actions/workflows/gradle.yaml/badge.svg?branch=release18.12[link=https://github.com/apache/ofbiz-framework/actions/workflows/gradle.yaml/badge.svg?branch=release18.12]
image:https://github.com/apache/ofbiz-framework/actions/workflows/codeql-analysis.yml/badge.svg?branch=release18.12[link=https://github.com/apache/ofbiz-framework/actions/workflows/codeql-analysis.yml/badge.svg?branch=release18.12]
image:https://qpkb254zxeu.montastic.io/badge[link=https://qpkb254zxeu.montastic.io]
If you are reading this file in AsciiDoc format you may want to see it in
https://ci.apache.org/projects/ofbiz/site/next/readme/html5/README.html[HTML]
or https://ci.apache.org/projects/ofbiz/site/next/readme/pdf/README.pdf[PDF] format
---
Welcome to *Apache OFBiz*! A powerful top level Apache software project. OFBiz
is an Enterprise Resource Planning (ERP) System written in Java and houses a
large set of libraries, entities, services and features to run all aspects of
@@ -53,12 +66,17 @@ ________________________________________________________________________________
[[system-requirements]]
== System requirements
The only requirement to run OFBiz is to have the Java Development Kit (JDK)
version 8 installed on your system (not just the JRE, but the full JDK) which
you can download from the below link. Make sure of setting the $JAVA_HOME
environment variable.
The only requirements to run OFBiz is
* to have the Java Development Kit (JDK) version 8 installed on your system
(not just the JRE, but the full JDK) that you can download from the below link.
Make sure of setting the $JAVA_HOME environment variable. +
https://adoptopenjdk.net/[JDK download], https://medium.com/@javachampions/java-is-still-free-2-0-0-6b9aa8d6d244[To know more about the JDK]
* If on Windows, a Powershell version >= 7.1.3 installed that you can download from the below link. +
https://github.com/PowerShell/PowerShell[Powershell]
http://www.oracle.com/technetwork/java/javase/downloads/index.html[JDK download]
[[quick-start]]
// tag::quickstart[]
@@ -67,6 +85,13 @@ http://www.oracle.com/technetwork/java/javase/downloads/index.html[JDK download]
To quickly install and fire-up OFBiz, please follow the below instructions from
the command line at the OFBiz top level directory (folder).
[[download-the-gradle-wrapper]]
=== Download the Gradle wrapper:
MS Windows: `init-gradle-wrapper`
Unix-like OS: `./gradle/init-gradle-wrapper.sh`
[[prepare-ofbiz]]
=== Prepare OFBiz:
@@ -111,13 +136,18 @@ In case of problems visit our link:#further-reading[Further reading section].
[[security]]
== Security
If you find a security issue, please report it to: security @ ofbiz.apache.org.
* If you find a pre-auth security issue, please report it to: security @ ofbiz.apache.org.
Once proper mitigations to the security issues are complete the OFBiz team will
disclose this information to the public mailing list.
* If you find a post-auth security issue, please https://s.apache.org/dsj2p[create a bug in our issue tracker (Jira)] .
You can find more information about security in OFBiz at
https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure[Keeping
OFBiz secure]
https://cwiki.apache.org/confluence/display/OFBIZ/Keeping+OFBiz+secure[Keeping OFBiz secure]
[CAUTION]
In production never use the credentials contained in demo data. Not only the admin credentials, but all of them.
[[build-system-syntax]]
== Build system syntax
@@ -259,8 +289,7 @@ operating system kill command. Use this command to force OFBiz termination if
the --shutdown command does not work. Usually this is needed when in the middle
of data loading or testing in OFBiz.
Warning: Be careful in using this command as force termination might lead to
inconsistent state / data
Warning: Be careful in using this command as force termination might lead to inconsistent state / data
`gradlew terminateOfbiz`
@@ -371,7 +400,7 @@ Example:
Beware that copying this command in Microsoft Word will automatically transform
the double dash in en dashes (Unicode 0x2013: –) Other cases not related to Word
were also reported.So when this command does not work check that you are using
dash! text
dash!
[[load-all-ofbiz-data]]
==== Load all OFBiz data
@@ -379,13 +408,13 @@ dash! text
Loads all data sets; meant for initial loading of generic OFBiz data. Can be
applied for development, testing, demonstration, etc. purposes. Be aware that
executing this task can result in your data being overwritten in your database
of choice. Use with caution in production environments.
of choice.
`gradlew loadAll`
`gradlew loadAll` OR `gradlew "ofbiz --load-data"`
OR
[CAUTION]
Use with caution in production environments.
`gradlew "ofbiz --load-data"`
[[load-seed-data]]
==== Load seed data
+1 -1
View File
@@ -1 +1 @@
trunk
18.12
@@ -18,7 +18,7 @@
specific language governing permissions and limitations
under the License.
-->
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="AcctgTransType.description.AMORTIZATION">
<value xml:lang="ar">الإطفاء</value>
<value xml:lang="de">Amortisation</value>
@@ -18,7 +18,7 @@
specific language governing permissions and limitations
under the License.
-->
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="AccountingCheckAccountCannotBeUpdated">
<value xml:lang="en">ERROR: Could not update Check Account.</value>
</property>
@@ -18,7 +18,7 @@
specific language governing permissions and limitations
under the License.
-->
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="AccountingAccount">
<value xml:lang="ar">حساب</value>
<value xml:lang="cs">Účet</value>
@@ -395,11 +395,7 @@ under the License.
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6012" periodTypeId="FISCAL_QUARTER" fromDate="2010-04-01 00:00:00.000" thruDate="2010-07-01 23:59:59.000" isClosed="N" periodNum="3" periodName="2010/Q2" parentPeriodId="6010"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6013" periodTypeId="FISCAL_QUARTER" fromDate="2010-07-01 00:00:00.000" thruDate="2010-10-01 23:59:59.000" isClosed="N" periodNum="4" periodName="2010/Q3" parentPeriodId="6010"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6014" periodTypeId="FISCAL_QUARTER" fromDate="2010-10-01 00:00:00.000" thruDate="2011-01-01 23:59:59.000" isClosed="N" periodNum="5" periodName="2010/Q4" parentPeriodId="6010"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01 00:00:00.000" thruDate="2020-01-01 23:59:59.000" isClosed="N" periodNum="1" periodName="2011-2020"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6016" periodTypeId="FISCAL_QUARTER" fromDate="2011-01-01 00:00:00.000" thruDate="2011-04-01 23:59:59.000" isClosed="N" periodNum="2" periodName="2011/Q1" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6017" periodTypeId="FISCAL_QUARTER" fromDate="2011-04-01 00:00:00.000" thruDate="2011-07-01 23:59:59.000" isClosed="N" periodNum="3" periodName="2011/Q2" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6018" periodTypeId="FISCAL_QUARTER" fromDate="2011-07-01 00:00:00.000" thruDate="2011-10-01 23:59:59.000" isClosed="N" periodNum="4" periodName="2011/Q3" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6019" periodTypeId="FISCAL_QUARTER" fromDate="2011-10-01 00:00:00.000" thruDate="2012-01-01 23:59:59.000" isClosed="N" periodNum="5" periodName="2011/Q4" parentPeriodId="6015"/>
<CustomTimePeriod organizationPartyId="Company" customTimePeriodId="6015" periodTypeId="FISCAL_YEAR" fromDate="2011-01-01 00:00:00.000" thruDate="2030-01-01 23:59:59.000" isClosed="N" periodNum="1" periodName="2011-2030"/>
<!-- to convert demo invoice -->
<UomConversionDated uomId="USD" uomIdTo="EUR" fromDate="2001-01-01 00:00:00.0" conversionFactor="0.7"/>
+1 -1
View File
@@ -19,7 +19,7 @@
-->
<entity-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entity-eca.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entity-eca.xsd">
<!-- To maintain FinAccount.actualBalance and FinAccount.availableBalance -->
<eca entity="FinAccountTrans" operation="create-store" event="return">
@@ -19,7 +19,7 @@ under the License.
-->
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
<!-- ========================================================= -->
<!-- ======================== Defaults ======================= -->
<!-- ========================================================= -->
@@ -11,20 +11,7 @@
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* 'License'); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
@@ -16,8 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*******************************************************************************/
partyIdFrom = parameters.partyIdFrom
partyIdTo = parameters.partyIdTo
if (partyIdFrom) {
context.partyNameResultFrom = runService("getPartyNameForDate", [partyId: partyIdFrom, compareDate: agreementDate, lastNameFirst: "Y"])
}
@@ -78,8 +78,8 @@ under the License.
<!-- TODO: somehow determine if this is an order placed against the account or some other type of withdrawal -->
<!-- TODO: handle order placed against (paid for with) the account -->
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="parameters.glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="parameters.glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="PAYMENT_ACCTG_TRANS"/>
</then>
</else-if>
@@ -89,6 +89,12 @@ under the License.
<!-- if positive will go to one account for write-off, if negative will go to another account for a fee -->
<!-- these will reverse depending on positive/negative amount -->
<if-compare field="finAccountTrans.amount" operator="less" value="0">
<calculate field="quickCreateAcctgTransAndEntries.amount" decimal-scale="${ledgerDecimals}" rounding-mode="${roundingMode}">
<calcop operator="multiply">
<calcop operator="get" field="quickCreateAcctgTransAndEntries.amount"/>
<number value="-1"/>
</calcop>
</calculate>
<set field="quickCreateAcctgTransAndEntries.debitGlAccountId" from-field="parameters.glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.creditGlAccountId" from-field="glAccountId"/>
<set field="quickCreateAcctgTransAndEntries.acctgTransTypeId" value="OUTGOING_PAYMENT"/>
@@ -186,7 +186,7 @@ under the License.
</entity-condition>
<set field="listSize" value="0" type="Long"/>
<if-not-empty field="maintList">
<set field="listSize" value="${util:size(maintList)}" type="Long"/>
<set field="listSize" value="${groovy:maintList.size()}" type="Long"/>
</if-not-empty>
<set field="maxIntervalQty" value="0" type="BigDecimal"/>
<iterate list="maintList" entry="maintValue">
@@ -263,7 +263,7 @@ under the License.
<if-not-empty field="compareDate">
<set field="listSize" value="0" type="Long"/>
<if-not-empty field="maintList">
<set field="listSize" value="${util:size(maintList)}" type="Long"/>
<set field="listSize" value="${groovy:maintList.size()}" type="Long"/>
</if-not-empty>
<set field="lastSvcLong" value="0" type="Long"/>
<set field="lastSvcDate" from-field="lastSvcLong" type="Timestamp"/>
@@ -1902,7 +1902,7 @@ under the License.
<clear-field field="debitEntry"/>
<make-value entity-name="AcctgTransEntry" value-field="debitEntry"/>
<set field="debitEntry.debitCreditFlag" value="D"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyIdTo"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyId"/>
<call-class-method method-name="getInvoiceTaxTotalForTaxAuthPartyAndGeo" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="taxAmount">
<field field="invoice" type="GenericValue"/>
@@ -1929,7 +1929,7 @@ under the License.
<clear-field field="debitEntry"/>
<make-value entity-name="AcctgTransEntry" value-field="debitEntry"/>
<set field="debitEntry.debitCreditFlag" value="D"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyIdFrom"/>
<set field="debitEntry.organizationPartyId" from-field="invoice.partyId"/>
<call-class-method method-name="getInvoiceUnattributedTaxTotal" class-name="org.apache.ofbiz.accounting.invoice.InvoiceWorker"
ret-field="taxAmount">
<field field="invoice" type="GenericValue"/>
@@ -742,7 +742,7 @@ under the License.
<set field="createFinAccountTransMap.partyId" from-field="parameters.organizationPartyId"/>
<now-timestamp field="createFinAccountTransMap.transactionDate"/>
<now-timestamp field="createFinAccountTransMap.entryDate"/>
<!-- set field="createFinAccountTransMap.statusId" value="CREATE"/>--><!-- TODO: It will uncomment when status Id field will add in FinAccountTrans Entity. -->
<set field="createFinAccountTransMap.statusId" value="FINACT_TRNS_CREATED"/>
<set field="createFinAccountTransMap.comments" value="Pay to ${parameters.partyId} for invoice Ids - ${parameters.invoiceIds}"/>
<call-service service-name="createFinAccountTrans" in-map-name="createFinAccountTransMap">
<result-to-field result-name="finAccountTransId"/>
@@ -70,7 +70,8 @@ under the License.
<field-map field-name="finAccountId" value="1002"/>
</entity-one>
<assert>
<if-empty field="finAccount"/>
<not><if-empty field="finAccount"/></not>
<not><if-empty field="finAccount.thruDate"/></not>
</assert>
<check-errors/>
</simple-method>
+2 -1
View File
@@ -20,7 +20,7 @@ under the License.
<ofbiz-component name="accounting"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<resource-loader name="main" type="component"/>
<classpath type="dir" location="config"/>
@@ -78,6 +78,7 @@ under the License.
<webapp name="accounting"
title="Accounting"
position="5"
server="default-server"
location="webapp/accounting"
base-permission="OFBTOOLS,ACCOUNTING"
@@ -19,7 +19,7 @@ under the License.
-->
<service-group xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-group.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-group.xsd">
<group name="createCreditCardAndAddress" send-mode="all">
<invoke name="createPostalAddress" mode="sync" result-to-context="true"/>
+1 -1
View File
@@ -19,7 +19,7 @@ under the License.
-->
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
<eca service="createBudget" event="commit">
<set field-name="statusId" value="BG_CREATED"/>
@@ -19,7 +19,7 @@ under the License.
-->
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
<!-- On cancelling invoice reverse its Accounting Transactions -->
<eca service="cancelInvoice" event="invoke">
@@ -19,7 +19,7 @@ under the License.
-->
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
<!-- this eca automatically posts the accounting transactions to GL -->
<eca service="createAcctgTransAndEntries" event="commit">
@@ -19,7 +19,7 @@ under the License.
-->
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
<!-- these SECAs are for automatically creating accounting transactions based on business transactions.
They should normally be "sync" SECAs so that they happen as soon
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services - Miscellaneous</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services: Agreements </description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -29,14 +29,14 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes include="pk" mode="OUT" optional="true"/>
<override name="textData" allow-html="any"/>
<override name="textData" allow-html="safe"/>
</service>
<service name="updateAgreement" default-entity-name="Agreement" engine="entity-auto" invoke="update" auth="true">
<description>Update an Agreement</description>
<permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="textData" allow-html="any"/>
<override name="textData" allow-html="safe"/>
</service>
<service name="expireAgreement" engine="entity-auto" default-entity-name="Agreement" invoke="expire" auth="true">
<description>Expire an Agreement</description>
@@ -60,7 +60,7 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/>
<auto-attributes include="pk" mode="INOUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="agreementText" allow-html="any"/>
<override name="agreementText" allow-html="safe"/>
<override name="agreementItemSeqId" optional="true"></override>
</service>
<service name="updateAgreementItem" default-entity-name="AgreementItem" engine="entity-auto" invoke="update" auth="true">
@@ -68,13 +68,12 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="agreementText" allow-html="any"/>
<override name="agreementText" allow-html="safe"/>
</service>
<service name="removeAgreementItem" default-entity-name="AgreementItem" engine="entity-auto" invoke="delete" auth="true">
<description>Remove an AgreementItem</description>
<permission-service service-name="acctgAgreementPermissionCheck" main-action="DELETE"/>
<auto-attributes include="pk" mode="INOUT" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
</service>
<!-- AgreementItemAttribute -->
@@ -102,14 +101,14 @@ under the License.
<permission-service service-name="acctgAgreementPermissionCheck" main-action="CREATE"/>
<auto-attributes include="pk" mode="INOUT" optional="true"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="textValue" allow-html="any"/>
<override name="textValue" allow-html="safe"/>
</service>
<service name="updateAgreementTerm" default-entity-name="AgreementTerm" engine="entity-auto" invoke="update" auth="true">
<description>Update an AgreementTerm</description>
<permission-service service-name="acctgAgreementPermissionCheck" main-action="UPDATE"/>
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<override name="textValue" allow-html="any"/>
<override name="textValue" allow-html="safe"/>
</service>
<service name="deleteAgreementTerm" default-entity-name="AgreementTerm" engine="entity-auto" invoke="delete" auth="true">
<description>Delete an AgreementTerm</description>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services: Budget</description>
<vendor>Apache OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Clear Commerce Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Cost Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services: Financial Account</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -48,7 +48,7 @@ under the License.
<attribute name="replenishPaymentId" type="String" mode="OUT" optional="true"/>
<attribute name="replenishLevel" type="BigDecimal" mode="OUT" optional="true"/>
</service>
<service name="deleteFinAccount" default-entity-name="FinAccount" engine="entity-auto" invoke="delete">
<service name="deleteFinAccount" default-entity-name="FinAccount" engine="entity-auto" invoke="expire">
<description>Delete a Financial Account</description>
<auto-attributes mode="IN" optional="false" include="pk"/>
</service>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services: Fixed Asset </description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -56,8 +56,8 @@ under the License.
<override name="invoiceTypeId" mode="IN" optional="false"/>
<override name="partyIdFrom" mode = "IN" optional="false"/>
<override name="partyId" mode = "IN" optional="false"/>
<override name="description" allow-html="any"/>
<override name="invoiceMessage" allow-html="any"/>
<override name="description" allow-html="safe"/>
<override name="invoiceMessage" allow-html="safe"/>
</service>
<service name="copyInvoice" engine="simple" default-entity-name="Invoice"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="copyInvoice">
@@ -80,8 +80,8 @@ under the License.
<permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<override name="description" allow-html="any"/>
<override name="invoiceMessage" allow-html="any"/>
<override name="description" allow-html="safe"/>
<override name="invoiceMessage" allow-html="safe"/>
</service>
<service name="setInvoiceStatus" engine="simple"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="setInvoiceStatus">
@@ -117,7 +117,7 @@ under the License.
<auto-attributes mode="IN" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<override name="invoiceItemSeqId" mode="INOUT" optional="true"/><!-- will optionally be assigned by the system -->
<override name="description" allow-html="any"/>
<override name="description" allow-html="safe"/>
</service>
<service name="updateInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="updateInvoiceItem">
@@ -125,7 +125,7 @@ under the License.
<permission-service service-name="acctgInvoicePermissionCheck" main-action="UPDATE"/>
<auto-attributes mode="INOUT" include="pk" optional="false"/>
<auto-attributes mode="IN" include="nonpk" optional="true"/>
<override name="description" allow-html="any"/>
<override name="description" allow-html="safe"/>
</service>
<service name="removeInvoiceItem" engine="simple" default-entity-name="InvoiceItem"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="removeInvoiceItem">
@@ -429,7 +429,7 @@ under the License.
<auto-attributes include="pk" mode="IN" optional="false"/>
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes entity-name="Content" include="nonpk" mode="IN" optional="true"/>
<attribute name="text" type="String" mode="IN" optional="false" allow-html="any"/>
<attribute name="text" type="String" mode="IN" optional="false" allow-html="safe"/>
<override name="contentId" optional="true"/>
<override name="fromDate" optional="true"/>
</service>
@@ -439,7 +439,7 @@ under the License.
<auto-attributes include="nonpk" mode="IN" optional="true"/>
<auto-attributes mode="IN" entity-name="Content" optional="true"/>
<attribute name="textDataResourceId" type="String" mode="IN" optional="true"/>
<attribute name="text" type="String" mode="IN" optional="true" allow-html="any"/>
<attribute name="text" type="String" mode="IN" optional="true" allow-html="safe"/>
</service>
<service name="isInvoiceInForeignCurrency" engine="simple"
location="component://accounting/minilang/invoice/InvoiceServices.xml" invoke="isInvoiceInForeignCurrency" auth="true">
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -556,7 +556,7 @@ under the License.
<attribute name="customTimePeriodId" mode="IN" type="String"/>
<attribute name="previousTimePeriod" mode="OUT" type="Map" optional="true"/>
</service>
<service name="getAcctgTransEntriesAndTransTotal" engine="simple" invoke="getAcctgTransEntriesAndTransTotal"
<service name="getAcctgTransEntriesAndTransTotal" engine="simple" invoke="getAcctgTransEntriesAndTransTotal"
location="component://accounting/minilang/ledger/AcctgTransServices.xml" auth="true">
<description>Given AcctgTransAndEntire and Calculate acctg trans total for specific time period.</description>
<attribute name="customTimePeriodStartDate" mode="IN" type="Timestamp"/>
@@ -581,7 +581,7 @@ under the License.
<attribute name="debitCreditDifference" type="BigDecimal" mode="OUT"/>
</service>
<service name="revertAcctgTransOnCancelInvoice" engine="simple"
<service name="revertAcctgTransOnCancelInvoice" engine="simple"
location="component://accounting/minilang/ledger/AcctgTransServices.xml" invoke="revertAcctgTransOnCancelInvoice" auth="true">
<description>Reverting Accounting Transaction And Entries on Canceling an Invoice</description>
<attribute name="invoiceId" mode="IN" type="String" optional="false"/>
@@ -589,7 +589,7 @@ under the License.
<service name="revertAcctgTransOnRemovePaymentApplications" engine="simple"
location="component://accounting/minilang/ledger/AcctgTransServices.xml" invoke="revertAcctgTransOnRemovePaymentApplications" auth="true">
<description>Create Reverse Accounting Transaction and Entries on removing PaymentApplication records.</description>
<attribute name="paymentApplicationId" mode="IN" type="String" optional="false"/>
<attribute name="paymentApplicationId" mode="IN" type="String" optional="false"/>
</service>
<service name="createGlAccountCategory" engine="entity-auto" default-entity-name="GlAccountCategory" invoke="create" auth="true">
@@ -656,7 +656,7 @@ under the License.
<attribute name="oldStatusId" type="String" mode="OUT" optional="true"/>
</service>
<service name="createUpdateCostCenter" engine="java" auth="true" invoke="createUpdateCostCenter"
<service name="createUpdateCostCenter" engine="java" auth="true" invoke="createUpdateCostCenter"
location="org.apache.ofbiz.accounting.ledger.GeneralLedgerServices">
<description>Create Update CostCenters</description>
<attribute name="glAccountId" mode="IN" type="String"/>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>OrbitalGateway Services</description>
<vendor></vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Payment Gateway Config Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>PayPal Services</description>
<service name="payPalSetExpressCheckout" engine="java"
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Permission Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services: Rate and related services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services: TaxAuthority and related </description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Accounting Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -558,11 +558,11 @@ public class InvoiceServices {
// Set adjustment amount as amountAlreadyIncluded to continue invoice item creation process
Boolean isTaxIncludedInPrice = "VAT_TAX".equals(adj.getString("orderAdjustmentTypeId")) && UtilValidate.isNotEmpty(adj.getBigDecimal("amountAlreadyIncluded")) && adj.getBigDecimal("amountAlreadyIncluded").signum() != 0;
if ((adj.getBigDecimal("amount").signum() == 0) && isTaxIncludedInPrice) {
if (isTaxIncludedInPrice && (adj.getBigDecimal("amount").signum() == 0)) {
adj.set("amount", adj.getBigDecimal("amountAlreadyIncluded"));
}
// If the absolute invoiced amount >= the abs of the adjustment amount, the full amount has already been invoiced, so skip this adjustment
if (adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal("amount").setScale(invoiceTypeDecimals, ROUNDING).abs()) > 0) {
if (isTaxIncludedInPrice && adjAlreadyInvoicedAmount.abs().compareTo(adj.getBigDecimal("amount").setScale(invoiceTypeDecimals, ROUNDING).abs()) > 0) {
continue;
}
@@ -338,6 +338,12 @@ public class AIMPaymentServices {
AuthorizeResponse ar = new AuthorizeResponse(httpResponse, apiType);
if (ar.isApproved()) {
result.put("authResult", Boolean.TRUE);
}
//When the transaction is already expired in Authorize.net, then the response is an error message with reason code 16 (i.e. "The transaction cannot be found");
// in this case we proceed without generating an error in order to void/cancel the transaction record in OFBiz as well.
//This else if block takes care of the expired transaction.
else if ("VOID".equals(props.get("transType")) && "16".equals(ar.getReasonCode())) {
result.put("authResult", Boolean.TRUE);
} else {
result.put("authResult", Boolean.FALSE);
if (Debug.infoOn()) {
@@ -23,6 +23,7 @@ import java.math.BigInteger;
import java.nio.charset.StandardCharsets;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
@@ -59,7 +60,9 @@ import javax.crypto.spec.DHPrivateKeySpec;
import javax.crypto.spec.DHPublicKeySpec;
import javax.crypto.spec.IvParameterSpec;
import org.apache.commons.codec.binary.Base64;
import org.apache.ofbiz.base.util.Debug;
import org.apache.ofbiz.base.util.GeneralException;
import org.apache.ofbiz.base.util.HttpClient;
import org.apache.ofbiz.base.util.HttpClientException;
import org.apache.ofbiz.base.util.StringUtil;
@@ -154,14 +157,23 @@ public class ValueLinkApi {
* @return Hex String of the encrypted pin (EAN) for transmission to ValueLink
*/
public String encryptPin(String pin) {
byte[] rawIv = new byte[8];
SecureRandom random = new SecureRandom();
random.nextBytes(rawIv);
IvParameterSpec iv = new IvParameterSpec(rawIv);
// get the Cipher
Cipher mwkCipher = this.getCipher(this.getMwkKey(), Cipher.ENCRYPT_MODE);
Cipher mwkCipher = null;
try {
mwkCipher = getCipher(this.getMwkKey(), Cipher.ENCRYPT_MODE, iv);
} catch (GeneralException e1) {
Debug.logError(e1, module);
}
// pin to bytes
byte[] pinBytes = pin.getBytes(StandardCharsets.UTF_8);
// 7 bytes of random data
byte[] random = this.getRandomBytes(7);
byte[] randomBytes = this.getRandomBytes(7);
// pin checksum
byte[] checkSum = this.getPinCheckSum(pinBytes);
@@ -169,8 +181,8 @@ public class ValueLinkApi {
// put all together
byte[] eanBlock = new byte[16];
int i;
for (i = 0; i < random.length; i++) {
eanBlock[i] = random[i];
for (i = 0; i < randomBytes.length; i++) {
eanBlock[i] = randomBytes[i];
}
eanBlock[7] = checkSum[0];
for (i = 0; i < pinBytes.length; i++) {
@@ -200,11 +212,26 @@ public class ValueLinkApi {
/**
* Decrypt an encrypted pin using the configured keys
* @param pin Hex String of the encrypted pin (EAN)
* @return Plain text String of the pin
* @return Plain text String of the pin @
*/
public String decryptPin(String pin) {
// get the Cipher
Cipher mwkCipher = this.getCipher(this.getMwkKey(), Cipher.DECRYPT_MODE);
// separate prefix with IV from the rest of encrypted data
byte[] encryptedPayload = Base64.decodeBase64(pin.getBytes());
byte[] iv = new byte[8];
byte[] encryptedBytes = new byte[encryptedPayload.length - iv.length];
// populate iv with bytes:
System.arraycopy(encryptedPayload, 0, iv, 0, iv.length);
// populate encryptedBytes with bytes:
System.arraycopy(encryptedPayload, iv.length, encryptedBytes, 0, encryptedBytes.length);
Cipher mwkCipher = null;
try {
mwkCipher = getCipher(getMwkKey(), Cipher.ENCRYPT_MODE, new IvParameterSpec(iv));
} catch (GeneralException e1) {
Debug.logError(e1, module);
}
// decrypt pin
String decryptedPinString = null;
@@ -271,7 +298,7 @@ public class ValueLinkApi {
}
/**
* Output the creation of public/private keys + KEK to the console for manual database update
* Output the creation of public/private keys + KEK to the console for manual database update @
*/
public StringBuffer outputKeyCreation(boolean kekOnly, String kekTest) {
return this.outputKeyCreation(0, kekOnly, kekTest);
@@ -340,8 +367,18 @@ public class ValueLinkApi {
byte[] loadKekBytes = loadedKek.getEncoded();
// test the KEK
Cipher cipher = this.getCipher(this.getKekKey(), Cipher.ENCRYPT_MODE);
byte[] kekTestB = { 0, 0, 0, 0, 0, 0, 0, 0 };
byte[] rawIv = new byte[8];
SecureRandom secRandom = new SecureRandom();
secRandom.nextBytes(rawIv);
IvParameterSpec iv = new IvParameterSpec(rawIv);
Cipher cipher = null;
try {
cipher = getCipher(this.getKekKey(), Cipher.ENCRYPT_MODE, iv);
} catch (GeneralException e1) {
Debug.logError(e1, module);
}
byte[] kekTestB = {0, 0, 0, 0, 0, 0, 0, 0 };
byte[] kekTestC = new byte[0];
if (kekTest != null) {
kekTestB = StringUtil.fromHexString(kekTest);
@@ -496,7 +533,7 @@ public class ValueLinkApi {
/**
* Generate a new MWK
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink @
*/
public byte[] generateMwk() {
KeyGenerator keyGen = null;
@@ -535,7 +572,7 @@ public class ValueLinkApi {
/**
* Generate a new MWK
* @param desBytes byte array of the DES key (24 bytes)
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink @
*/
public byte[] generateMwk(byte[] desBytes) {
if (debug) {
@@ -570,7 +607,7 @@ public class ValueLinkApi {
/**
* Generate a new MWK
* @param mwkdes3 pre-generated DES3 SecretKey
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink
* @return Hex String of the new encrypted MWK ready for transmission to ValueLink @
*/
public byte[] generateMwk(SecretKey mwkdes3) {
// zeros for checksum
@@ -581,9 +618,18 @@ public class ValueLinkApi {
Random ran = new SecureRandom();
ran.nextBytes(random);
byte[] rawIv = new byte[8];
SecureRandom secRandom = new SecureRandom();
secRandom.nextBytes(rawIv);
IvParameterSpec iv = new IvParameterSpec(rawIv);
// open a cipher using the new mwk
Cipher cipher = this.getCipher(mwkdes3, Cipher.ENCRYPT_MODE);
Cipher cipher = null;
try {
cipher = getCipher(mwkdes3, Cipher.ENCRYPT_MODE, iv);
} catch (GeneralException e1) {
Debug.logError(e1, module);
}
// make the checksum - encrypted 8 bytes of 0's
byte[] encryptedZeros = new byte[0];
@@ -617,7 +663,12 @@ public class ValueLinkApi {
* @return encrypted byte array
*/
public byte[] encryptViaKek(byte[] content) {
return cryptoViaKek(content, Cipher.ENCRYPT_MODE);
try {
return cryptoViaKek(content, Cipher.ENCRYPT_MODE);
} catch (GeneralException e1) {
Debug.logError(e1, module);
}
return null;
}
/**
@@ -626,7 +677,12 @@ public class ValueLinkApi {
* @return decrypted byte array
*/
public byte[] decryptViaKek(byte[] content) {
return cryptoViaKek(content, Cipher.DECRYPT_MODE);
try {
return cryptoViaKek(content, Cipher.DECRYPT_MODE);
} catch (GeneralException e1) {
Debug.logError(e1, module);
}
return null;
}
/**
@@ -772,46 +828,50 @@ public class ValueLinkApi {
return dhParamSpec;
}
// actual kek encryption/decryption code
protected byte[] cryptoViaKek(byte[] content, int mode) {
/**
* actual kek encryption/decryption code
* @throws GeneralException
*/
protected byte[] cryptoViaKek(byte[] content, int mode) throws GeneralException {
// open a cipher using the kek for transport
Cipher cipher = this.getCipher(this.getKekKey(), mode);
byte[] dec = new byte[0];
byte[] rawIv = new byte[8];
SecureRandom random = new SecureRandom();
random.nextBytes(rawIv);
IvParameterSpec iv = new IvParameterSpec(rawIv);
// Create the Cipher - DESede/CBC/PKCS5Padding
byte[] encBytes = null;
Cipher cipher = getCipher(getKekKey(), mode, iv);
try {
dec = cipher.doFinal(content);
} catch (IllegalStateException e) {
Debug.logError(e, module);
} catch (IllegalBlockSizeException e) {
Debug.logError(e, module);
} catch (BadPaddingException e) {
encBytes = cipher.doFinal(content);
} catch (IllegalStateException | BadPaddingException | IllegalBlockSizeException e) {
Debug.logError(e, module);
}
return dec;
// Prepend iv as a prefix to use it during decryption
byte[] combinedPayload = new byte[rawIv.length + encBytes.length];
// populate payload with prefix iv and encrypted data
System.arraycopy(iv, 0, combinedPayload, 0, rawIv.length);
System.arraycopy(cipher, 0, combinedPayload, 8, encBytes.length);
return encBytes;
}
// return a cipher for a key - DESede/CBC/NoPadding IV = 0
protected Cipher getCipher(SecretKey key, int mode) {
byte[] zeros = { 0, 0, 0, 0, 0, 0, 0, 0 };
IvParameterSpec iv = new IvParameterSpec(zeros);
// return a cipher for a key - DESede/CBC/NoPadding with random IV
protected static Cipher getCipher(Key key, int mode, IvParameterSpec iv) throws GeneralException {
// create the Cipher - DESede/CBC/NoPadding
Cipher mwkCipher = null;
Cipher cipher = null;
try {
mwkCipher = Cipher.getInstance("DESede/CBC/NoPadding");
} catch (NoSuchAlgorithmException e) {
Debug.logError(e, module);
return null;
} catch (NoSuchPaddingException e) {
Debug.logError(e, module);
cipher = Cipher.getInstance("DESede/CBC/NoPadding");
} catch (NoSuchAlgorithmException | NoSuchPaddingException e) {
throw new GeneralException(e);
}
try {
mwkCipher.init(mode, key, iv);
} catch (InvalidKeyException e) {
Debug.logError(e, "Invalid key", module);
} catch (InvalidAlgorithmParameterException e) {
Debug.logError(e, module);
cipher.init(mode, key, iv);
} catch (InvalidKeyException | InvalidAlgorithmParameterException e) {
throw new GeneralException(e);
}
return mwkCipher;
return cipher;
}
protected byte[] getPinCheckSum(byte[] pinBytes) {
@@ -298,6 +298,11 @@ under the License.
<input type="text" size='14' name='fromDate' />
<span class="label">${uiLabelMap.CommonThruDate}</span>
<input type="text" size='14' name='thruDate' />
<span class="label">${uiLabelMap.FormFieldTitle_isClosed}:</span>
<select name="isClosed">
<option value="N">${uiLabelMap.CommonN}</option>
<option value="Y">${uiLabelMap.CommonY}</option>
</select>
<input type="submit" value="${uiLabelMap.CommonAdd}" />
</div>
</form>
@@ -20,7 +20,7 @@
<test-suite suite-name="accountingtests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
<test-case case-name="accounting-tests-data-load">
<entity-xml action="load" entity-xml-url="component://accounting/testdef/data/AccountingTestsData.xml"/>
@@ -20,7 +20,7 @@
<test-suite suite-name="fixedassettests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
<test-case case-name="fixedasset-tests">
<simple-method-test location="component://accounting/minilang/test/FixedAssetTests.xml"/>
@@ -20,7 +20,7 @@
<test-suite suite-name="invoicetests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
<test-case case-name="auto-invoice-tests">
<simple-method-test location="component://accounting/minilang/test/AutoInvoiceTests.xml"/>
@@ -20,7 +20,7 @@
<test-suite suite-name="paymentappltests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
<test-case case-name="application-tests-data-load">
<entity-xml action="load" entity-xml-url="component://accounting/testdef/data/PaymentApplicationTestsData.xml"/>
@@ -20,7 +20,7 @@
<test-suite suite-name="paymenttests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
<test-case case-name="auto-payment-tests">
<simple-method-test location="component://accounting/minilang/test/AutoPaymentTests.xml"/>
@@ -20,7 +20,7 @@
<test-suite suite-name="ratetests"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/test-suite.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/test-suite.xsd">
<test-case case-name="rate-tests-data-load">
<entity-xml action="load" entity-xml-url="component://accounting/testdef/data/RateTestsData.xml"/>
</test-case>
@@ -194,7 +194,7 @@ under the License.
<request-map uri="updateInvoiceItem">
<security https="true" auth="true"/>
<event type="service-multi" invoke="updateInvoiceItem"/>
<response name="success" type="request-redirect-noparam" value="listInvoiceItems"/>
<response name="success" type="request-redirect" value="listInvoiceItems"/>
<response name="error" type="view" value="listInvoiceItems"/>
</request-map>
<request-map uri="removeInvoiceItem">
@@ -1087,7 +1087,7 @@ under the License.
<request-map uri="updateBudgetItem">
<security https="true" auth="true"/>
<event type="service-multi" invoke="updateBudgetItem"/>
<response name="success" type="request-redirect-noparam" value="EditBudgetItems"/>
<response name="success" type="request-redirect" value="EditBudgetItems"/>
<response name="error" type="view" value="EditBudgetItems"/>
</request-map>
<request-map uri="removeBudgetItem">
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
under the License.
-->
<web-app version="3.0">
<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
<display-name>Apache OFBiz - Accounting Manager</display-name>
<description>Accounting Manager Module of the Apache OFBiz Project</description>
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -88,6 +97,9 @@ under the License.
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -15,7 +15,7 @@ KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<web-app version="3.0">
<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
<display-name>Apache OFBiz - Account Payable</display-name>
<description>Accounting Payable Module of the Apache OFBiz Project</description>
@@ -58,6 +58,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -66,6 +71,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
<!-- NOTE: not all app servers support mounting implementations of the HttpSessionActivationListener interface -->
@@ -81,6 +90,11 @@ under the License.
<servlet-name>ControlServlet</servlet-name>
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
<welcome-file>index.html</welcome-file>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -19,7 +19,7 @@ specific language governing permissions and limitations
under the License.
-->
<web-app version="3.0">
<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
<display-name>Apache OFBiz - Account Receivable</display-name>
<description>Accounting Receivable Module of the Apache OFBiz Project</description>
@@ -62,6 +62,11 @@ under the License.
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -70,6 +75,10 @@ under the License.
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -88,6 +97,9 @@ under the License.
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -268,6 +268,9 @@ under the License.
<screen name="main">
<section>
<condition>
<if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<set field="headerItem" value="main"/>
<entity-condition entity-name="PaymentType" list="paymentTypes">
@@ -165,7 +165,7 @@ under the License.
<field name="submitButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="ListPayment" list-name="listIt" title="" paginate-target="LookupPayment"
<form name="ListPayment" list-name="listIt" title="" type="list" paginate-target="LookupPayment"
odd-row-style="alternate-row" default-table-style="basic-table hover-bar">
<actions>
<service service-name="performFind" result-map="result" result-map-list="listIt">
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="FindFinAccounts" type="single" target="FindFinAccount"
@@ -73,7 +73,7 @@ under the License.
<parameter param-name="partyId" from-field="ownerPartyId"/>
</hyperlink>
</field>
<field name="deleteLink" title=" " widget-style="buttontext">
<field name="deleteLink" title=" " widget-style="buttontext" use-when="thruDate==null">
<hyperlink description="${uiLabelMap.CommonDelete}" target="deleteFinAccount" also-hidden="false">
<parameter param-name="finAccountId"/>
</hyperlink>
@@ -123,7 +123,7 @@ under the License.
</drop-down>
</field>
<field name="statusId" use-when="finAccount!=null" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="false" current-description="${currentStatus.description}">
<drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}">
<entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
<entity-constraint name="statusId" env-name="finAccount.statusId"/>
<entity-order-by field-name="sequenceId"/>
@@ -336,7 +336,7 @@ under the License.
<field name="glReconciliationId" position="2">
<drop-down allow-empty="true">
<option key="_NA_" description="${uiLabelMap.CommonNotAssigned}"/>
<list-options list-name="glReconciliations" key-name="glReconciliationId"
<list-options list-name="glReconciliations" key-name="glReconciliationId"
description="${glReconciliationName}[[${glReconciliationId}] [${reconciledDate}] [${reconciledBalance}]]"/>
</drop-down>
</field>
@@ -346,17 +346,17 @@ under the License.
<field name="thruEntryDate" position="2"><date-time/></field>
<field name="searchButton" widget-style="smallSubmit"><submit button-type="button"/></field>
</form>
<form name="FindBankReconciliationFinAcctTrans" target="BankReconciliation"
<form name="FindBankReconciliationFinAcctTrans" target="BankReconciliation"
extends="FindFinAccountTransactions">
<field name="statusId" title="${uiLabelMap.CommonStatus}"><display-entity entity-name="StatusItem"/></field>
<field name="glReconciliationId" position="2">
<drop-down>
<list-options list-name="glReconciliations" key-name="glReconciliationId"
<list-options list-name="glReconciliations" key-name="glReconciliationId"
description="${glReconciliationName}[[${glReconciliationId}] [${reconciledDate}] [${reconciledBalance}]]"/>
</drop-down>
</field>
</form>
<form name="EditDepositPayment" extends="EditPayment"
<form name="EditDepositPayment" extends="EditPayment"
extends-resource="component://accounting/widget/PaymentForms.xml" target="createDepositPayment">
<actions>
<entity-one entity-name="FinAccount" value-field="finAccount"/>
@@ -400,12 +400,8 @@ under the License.
</actions>
<alt-target use-when="glReconciliationId != null" target="updateFinAccountGlReconciliation"/>
<field name="finAccountId"><hidden value="${finAccountId}"/></field>
<field name="glReconciliationId" use-when="glReconciliationId == null"><ignored/></field>
<field name="glReconciliationId" use-when="glReconciliationId != null"><display/></field>
<field name="glAccountId"><hidden value="${finAccount.postToGlAccountId}"/></field>
<field name="organizationPartyId"><lookup target-form-name="LookupPartyName"/></field>
<field name="reconciledBalance" use-when="${reconciledBalance == null}"><hidden/></field>
<field name="reconciledBalance" use-when="&quot;GLREC_RECONCILED&quot;.equals(&quot;${glReconciliation.statusId}&quot;)"><display type="currency" currency="${defaultOrganizationPartyCurrencyUomId}"/></field>
<field name="reconciledDate" title="${uiLabelMap.AccountingReconciliationDate}"><date-time/></field>
<field name="createButton" use-when="glReconciliationId == null" widget-style="smallSubmit">
<submit button-type="button"/>
@@ -365,7 +365,7 @@ under the License.
</drop-down>
</field>
<field name="statusId" use-when="fixedAssetMaint!=null" title="${uiLabelMap.CommonStatus}">
<drop-down allow-empty="false" current-description="${currentStatus.description}">
<drop-down allow-empty="false" current="first-in-list" current-description="${currentStatus.description}">
<entity-options entity-name="StatusValidChangeToDetail" key-field-name="statusIdTo" description="${transitionName} (${description})">
<entity-constraint name="statusId" env-name="fixedAssetMaint.statusId"/>
<entity-order-by field-name="sequenceId"/>
+3 -3
View File
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="FindAcctgTrans" target="FindAcctgTrans" type="single" title="" default-map-name="journal"
@@ -763,7 +763,7 @@ under the License.
<field name="description"><textarea/></field>
<field name="createButton" widget-style="smallSubmit"><submit button-type="button"/></field>
<sort-order>
<sort-field name="organizationPartyId"/>
<sort-field name="organizationPartyId"/>
<sort-field name="acctgTransTypeId"/>
<sort-field name="glFiscalTypeId"/>
<sort-field name="glJournalId"/>
@@ -861,7 +861,7 @@ under the License.
</field>
<field name="reconciledDate"><date-time/></field>
<field name="organizationPartyId"><display/></field>
<field name="reconciledBalance"><display/></field>
<field name="reconciledBalance" use-when="&quot;GLREC_RECONCILED&quot;.equals(&quot;${glReconciliation.statusId}&quot;)"><display type="currency" currency="${defaultOrganizationPartyCurrencyUomId}"/></field>
<field name="openingBalance" use-when="${groovy:'GLREC_RECONCILED'.equals(glReconciliation?.statusId)}"><display/></field>
<field use-when="glReconciliationId!=null" name="updateButton" title="${uiLabelMap.CommonUpdate}" widget-style="buttontext" ><submit button-type="text-link"/></field>
</form>
@@ -18,7 +18,7 @@ specific language governing permissions and limitations
under the License.
-->
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<forms xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://ofbiz.apache.org/Widget-Form" xsi:schemaLocation="http://ofbiz.apache.org/Widget-Form http://ofbiz.apache.org/dtds/widget-form.xsd">
<form name="ListCompanies" type="list" title="Internal Organizations" list-name="parties"
@@ -375,7 +375,7 @@ under the License.
</field>
<field name="errorGlJournalId" tooltip="${groovy: import org.apache.ofbiz.base.util.UtilProperties;
if((partyAcctgPreference==null&amp;&amp;aggregatedPartyAcctgPreference!= null&amp;&amp;aggregatedPartyAcctgPreference.get('errorGlJournalId')!=null) ||
(partyAcctgPreference!=null&amp;&amp;partyAcctgPreference.get('errorGlJournalId')==null&amp;&amp;aggregatedPartyAcctgPreference!= null&amp;&amp;aggregatedPartyAcctgPreference.get('errorGlJournalId')!=null))return
(partyAcctgPreference!=null&amp;&amp;partyAcctgPreference.get('errorGlJournalId')==null&amp;&amp;aggregatedPartyAcctgPreference!= null&amp;&amp;aggregatedPartyAcctgPreference.get('errorGlJournalId')!=null))return
(UtilProperties.getMessage('AccountingUiLabels', 'AccountingInheritedValue', locale))}">
<drop-down allow-empty="true">
<entity-options entity-name="GlJournal" key-field-name="glJournalId" description="${glJournalName} [${glJournalId}]">
@@ -1188,7 +1188,7 @@ under the License.
<field name="glAccountClassId"><display-entity entity-name="GlAccountClass" key-field-name="glAccountClassId"/></field>
<field name="glResourceTypeId"><display-entity entity-name="GlResourceType" key-field-name="glResourceTypeId"/></field>
<field name="glXbrlClassId"><display-entity entity-name="GlXbrlClass" key-field-name="glXbrlClassId"/></field>
<field name="parentGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${parentGlAccountId}"/></field>
<field name="parentGlAccountId"><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${parentGlAccountId}"/></field>
<field name="accountCode" ><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountCode}"/></field>
<field name="accountName" ><display-entity entity-name="GlAccount" key-field-name="glAccountId" description="${accountName}"/></field>
<field name="description"><display description="${description}"/></field>
@@ -69,10 +69,8 @@ under the License.
<field-map field-name="compareDate" from-field="invoiceDate"/>
<field-map field-name="lastNameFirst" value="Y"/>
</service>
<set field="amountToApply" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)
.multiply(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceCurrencyConversionRate(delegator,invoiceId))}"/>
<set field="total" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)
.multiply(org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceCurrencyConversionRate(delegator,invoiceId))}"/>
<set field="amountToApply" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(delegator,invoiceId)}"/>
<set field="total" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(delegator,invoiceId)}"/>
</row-actions>
<field name="invoiceId" widget-style="buttontext" sort-field="true">
@@ -81,7 +79,7 @@ under the License.
</hyperlink>
</field>
<field name="invoiceTypeId" sort-field="true"><display-entity entity-name="InvoiceType"/></field>
<field name="invoiceDate" sort-field="true"><display description="${date:dateTimeString(invoiceDate, timeZone, locale)}"/></field>
<field name="invoiceDate" sort-field="true"><display type="date"/></field>
<field name="statusId" title="${uiLabelMap.CommonStatus}" sort-field="true"><display-entity entity-name="StatusItem"/></field>
<field name="description" sort-field="true"><display/></field>
<field name="partyIdFrom" title="${uiLabelMap.AccountingFromParty}" sort-field="true">
@@ -188,6 +188,7 @@ under the License.
<order-by field-name="invoiceItemSeqId"/>
</entity-and>
<script location="component://accounting/groovyScripts/invoice/CreateApplicationList.groovy"/>
<set field="parameters.statusId" from-field="invoice.statusId"/>
<set field="invoiceAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceTotal(invoice)}" type="BigDecimal"/>
<set field="notAppliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceNotApplied(invoice)}" type="BigDecimal"/>
<set field="appliedAmount" value="${groovy:org.apache.ofbiz.accounting.invoice.InvoiceWorker.getInvoiceApplied(invoice)}" type="BigDecimal"/>
@@ -891,6 +891,11 @@ under the License.
<set field="fromDate" from-field="parameters.fromDate" type="Timestamp"/>
<set field="thruDate" from-field="parameters.thruDate" type="Timestamp"/>
<set field="glFiscalTypeId" from-field="parameters.glFiscalTypeId" default-value="ACTUAL"/>
<service service-name="getPartyAccountingPreferences" result-map="result">
<field-map field-name="organizationPartyId" value="${groovy:parameters.get('ApplicationDecorator|organizationPartyId')}"/>
</service>
<set field="partyAcctgPreference" from-field="result.partyAccountingPreference"/>
<set field="currencyUomId" from-field="partyAcctgPreference.baseCurrencyUomId"/>
<script location="component://accounting/groovyScripts/reports/IncomeStatement.groovy"/>
</actions>
<widgets>
@@ -40,6 +40,9 @@ under the License.
<screen name="main">
<section>
<condition>
<if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<set field="tabButtonItem" value="main"></set>
<set field="invoiceTypeId" value="PURCHASE_INVOICE"/>
@@ -174,7 +174,6 @@ under the License.
<set field="asm_multipleSelectForm" value="CommissionRun"/>
<set field="asm_multipleSelect" value="CommissionRun_partyId"/>
<set field="asm_formSize" value="700"/>
<set field="asm_listItemPercentOfForm" value="95"/>
<set field="asm_sortable" value="false"/>
<property-map resource="AccountingUiLabels" map-name="uiLabelMap" global="true"/>
<set field="asm_title" from-field="uiLabelMap.AccountingSelectPartiesForCommissionInvoice"/>
@@ -42,6 +42,9 @@ under the License.
<screen name="main">
<section>
<condition>
<if-service-permission service-name="acctgBasePermissionCheck" main-action="VIEW"/>
</condition>
<actions>
<set field="tabButtonItem" value="main"/>
<set field="invoiceTypeId" value="SALES_INVOICE"/>
@@ -63,12 +63,7 @@ under the License.
<section>
<actions>
<set field="titleProperty" value="AccountingFindArInvoices"/>
<service service-name="performFind" result-map="result">
<field-map field-name="inputFields" from-field="parameters"/>
<field-map field-name="entityName" value="InvoiceAndType"/>
<field-map field-name="orderBy" value="invoiceDate DESC"/>
</service>
<set field="invoices" from-field="result.listIt"/>
<set field="tabButtonItem" value="viewInvoices"/>
</actions>
<widgets>
<decorator-screen name="CommonInvoiceDecorator" location="${parameters.mainDecoratorLocation}">
@@ -85,9 +80,7 @@ under the License.
<include-form name="FindArInvoices" location="component://accounting/widget/ar/forms/InvoiceForms.xml"/>
</decorator-section>
<decorator-section name="search-results">
<platform-specific>
<html><html-template location="component://accounting/template/ar/invoice/ListInvoices.ftl"/></html>
</platform-specific>
<include-form name="ListInvoices" location="component://accounting/widget/InvoiceForms.xml"/>
</decorator-section>
</decorator-screen>
</widgets>
@@ -18,7 +18,7 @@
specific language governing permissions and limitations
under the License.
-->
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="CommonExtCreatePublicMessage">
<value xml:lang="de">Erzeuge öffentliche Nachricht</value>
<value xml:lang="en">Create Public Message</value>
@@ -90,6 +90,19 @@ under the License.
<responsecode>301</responsecode>
</forward>
</url-config>
<url-config>
<description>sample: remove /control in baseEcommerceSecureUrl (OFBIZ-11267)</description>
<url-pattern>^/ecomseo/control/(.*)$</url-pattern>
<seo>
<replacement>/ecomseo/$1</replacement>
</seo>
<forward>
<replacement>/ecomseo/$1</replacement>
<responsecode>301</responsecode>
</forward>
</url-config>
</url-configs>
<char-filters>
@@ -18,7 +18,7 @@
specific language governing permissions and limitations
under the License.
-->
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<resource xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-properties.xsd">
<property key="PageTitleEditProductCategory">
<value xml:lang="en">Edit Product Category</value>
<value xml:lang="fr">Edition de la catégorie produit</value>
@@ -19,7 +19,7 @@ under the License.
-->
<entitymodel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/entitymodel.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/entitymodel.xsd">
<title>Entity of an Apache OFBiz Component</title>
<description>None</description>
<version>1.0</version>
@@ -294,22 +294,25 @@
}
</script>
<set field="acctgPreferenceCtx.partyId" from-field="partyId"/>
<set field="acctgPreferenceCtx.taxFormId" value="US_IRS_1120"/>
<set field="acctgPreferenceCtx.cogsMethodId" value="COGS_AVG_COST"/>
<set field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
<set field="acctgPreferenceCtx.oldInvoiceSequenceEnumId" value="INVSQ_ENF_SEQ"/>
<set field="acctgPreferenceCtx.invoiceIdPrefix" from-field="parameters.invoiceIdPrefix"/>
<set field="acctgPreferenceCtx.oldQuoteSequenceEnumId" value="INVSQ_ENF_SEQ"/>
<set field="acctgPreferenceCtx.quoteIdPrefix" value="QU"/>
<set field="acctgPreferenceCtx.oldOrderSequenceEnumId" value="INVSQ_ENF_SEQ"/>
<set field="acctgPreferenceCtx.orderIdPrefix" value="OD"/>
<call-service service-name="createPartyAcctgPreference" in-map-name="acctgPreferenceCtx"/>
<entity-one entity-name="PartyAcctgPreference" value-field="partyAcctgPreference"/>
<if-empty field="partyAcctgPreference">
<set field="acctgPreferenceCtx.partyId" from-field="partyId"/>
<set field="acctgPreferenceCtx.taxFormId" value="US_IRS_1120"/>
<set field="acctgPreferenceCtx.cogsMethodId" value="COGS_AVG_COST"/>
<set field="acctgPreferenceCtx.baseCurrencyUomId" value="USD"/>
<set field="acctgPreferenceCtx.oldInvoiceSequenceEnumId" value="INVSQ_ENF_SEQ"/>
<set field="acctgPreferenceCtx.invoiceIdPrefix" from-field="parameters.invoiceIdPrefix"/>
<set field="acctgPreferenceCtx.oldQuoteSequenceEnumId" value="INVSQ_ENF_SEQ"/>
<set field="acctgPreferenceCtx.quoteIdPrefix" value="QU"/>
<set field="acctgPreferenceCtx.oldOrderSequenceEnumId" value="INVSQ_ENF_SEQ"/>
<set field="acctgPreferenceCtx.orderIdPrefix" value="OD"/>
<call-service service-name="createPartyAcctgPreference" in-map-name="acctgPreferenceCtx"/>
</if-empty>
<!-- run demo General Chart Of Accounts -->
<entity-condition entity-name="GlAccount" list="glAccountList"/>
<if-empty field="glAccountList">
<set field="importChartOfAccountCtx.filename" value="${sys:getProperty('ofbiz.home')}/applications/accounting/data/OfbizSetupChartOfAccountsData.xml"/>
<set field="importChartOfAccountCtx.filename" value="${sys:getProperty('ofbiz.home')}/applications/datamodel/data/demo/GlAccountDemoData.xml"/>
<session-to-field field="importChartOfAccountCtx.userLogin" session-name="userLogin"/>
<call-service service-name="entityImport" in-map-name="importChartOfAccountCtx"/>
<check-errors/>
+1 -1
View File
@@ -20,7 +20,7 @@ under the License.
<ofbiz-component name="commonext"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/ofbiz-component.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/ofbiz-component.xsd">
<resource-loader name="main" type="component"/>
<classpath type="dir" location="config"/>
+1 -1
View File
@@ -19,6 +19,6 @@ under the License.
-->
<service-eca xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/service-eca.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/service-eca.xsd">
</service-eca>
@@ -19,7 +19,7 @@ under the License.
-->
<services xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/services.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/services.xsd">
<description>Commonext Component Services</description>
<vendor>OFBiz</vendor>
<version>1.0</version>
@@ -42,7 +42,8 @@ under the License.
<response name="success" type="view-last"/>
</request-map>
<request-map uri="stream">
<request-map uri="stream">
<security https="true" auth="true"/>
<event type="java" path="org.apache.ofbiz.content.data.DataEvents" invoke="serveObjectData"/>
<response name="success" type="none"/>
<response name="error" type="view" value="error"/>
@@ -19,7 +19,7 @@
under the License.
-->
<web-app version="3.0">
<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
<display-name>Apache OFBiz - Setup Manager</display-name>
<description>Setup Manager Module of the Apache OFBiz Project</description>
@@ -57,6 +57,11 @@
<filter-name>ContextFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.ContextFilter</filter-class>
</filter>
<filter>
<display-name>SameSiteFilter</display-name>
<filter-name>SameSiteFilter</filter-name>
<filter-class>org.apache.ofbiz.webapp.control.SameSiteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>ControlFilter</filter-name>
<url-pattern>/*</url-pattern>
@@ -65,6 +70,10 @@
<filter-name>ContextFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>SameSiteFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<listener><listener-class>org.apache.ofbiz.webapp.control.ControlEventListener</listener-class></listener>
<listener><listener-class>org.apache.ofbiz.webapp.control.LoginEventListener</listener-class></listener>
@@ -80,8 +89,11 @@
<servlet-name>ControlServlet</servlet-name>
<url-pattern>/control/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>60</session-timeout><!-- in minutes -->
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
@@ -1,52 +0,0 @@
<%--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--%>
<%@ page import="org.apache.ofbiz.base.util.*" %>
<html>
<head>
<title>OFBiz Message</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<% String errorMsg = (String) request.getAttribute("_ERROR_MESSAGE_"); %>
<body bgcolor="#FFFFFF">
<div align="center">
<br/>
<table width="100%" border="1" height="200">
<tr>
<td>
<table width="100%" border="0" height="200">
<tr bgcolor="#CC6666">
<td height="45">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="4" color="#FFFFFF"><b>:ERROR MESSAGE:</b></font></div>
</td>
</tr>
<tr>
<td>
<div align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><%=UtilFormatOut.replaceString(errorMsg, "\n", "<br/>")%></font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</div>
<div align="center"></div>
</body>
</html>
@@ -17,7 +17,7 @@
-->
<web-app version="3.0">
<web-app version="4.0" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd">
<display-name>Empty placeholder</display-name>
<description>Empty placeholder, see http://svn.apache.org/viewvc?view=revision&amp;revision=1612202 </description>
</web-app>
@@ -59,12 +59,12 @@ function callStateAutocompleter(data){
jQuery('#shipToStateProvinceGeoId').value = "_NA_";
jQuery("#shipStates").fadeOut("fast");
jQuery("#advice-required-shipToStateProvinceGeo").fadeOut("fast");
jQuery("#shipToStateProvinceGeo").unbind("blur");
jQuery("#shipToStateProvinceGeo").off("blur");
} else {
jQuery('#shipToStateProvinceGeo').value = "";
jQuery('#shipToStateProvinceGeoId').value = "";
jQuery("#shipStates").fadeIn("fast");
jQuery("#shipToStateProvinceGeo").bind("blur", function() {
jQuery("#shipToStateProvinceGeo").on("blur", function() {
if (jQuery('#shipToStateProvinceGeo').val() == "") {
jQuery("#advice-required-shipToStateProvinceGeo").fadeIn("fast");
}
@@ -81,7 +81,7 @@ function setKeyAsParameter(event, ui) {
function getAssociatedStateList(countryId, stateId, errorId, divId) {
var countryGeoId = jQuery("#" + countryId).val();
var requestToSend = "getAssociatedStateList";
if (jQuery('#orderViewed')) {
if (jQuery('#orderViewed').length) {
requestToSend = "/ordermgr/control/getAssociatedStateList"
}
jQuery.ajax({
@@ -105,11 +105,11 @@ function getAssociatedStateList(countryId, stateId, errorId, divId) {
if (jQuery("#" + divId).is(':visible') || jQuery("#" + errorId).is(':visible')) {
jQuery("#divId").fadeOut("fast");
jQuery("#errorId").fadeOut("fast");
jQuery("#stateId").unbind("blur");
jQuery("#stateId").off("blur");
}
} else {
jQuery("#divId").fadeIn("fast");
jQuery("#stateId").bind("blur", function() {
jQuery("#stateId").on("blur", function() {
if (jQuery("#" + stateId).val() == "") {
jQuery("#errorId").fadeIn("fast")
}
@@ -119,7 +119,8 @@
<field name="payToPartyId"><hidden value="${partyId}"/></field>
<field name="partyId"><hidden value="${partyId}"/></field>
<field name="inventoryFacilityId"><hidden value="${parameters.facilityId}"/></field>
<field name="visualThemeId"><hidden value="EC_DEFAULT"/></field>
<!-- visualThemeId must be replaced by ecomThemeId because of Entity.field names conflict. See OFBIZ-10567 -->
<field name="ecomThemeId" entry-name="visualThemeId"><hidden value="EC_DEFAULT"/></field>
<field name="manualAuthIsCapture"><hidden value="N"/></field>
<field name="prorateShipping"><hidden value="Y"/></field>
<field name="prorateTaxes"><hidden value="Y"/></field>
+1 -1
View File
@@ -19,7 +19,7 @@ under the License.
-->
<component-loader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://ofbiz.apache.org/dtds/component-loader.xsd">
xsi:noNamespaceSchemaLocation="https://ofbiz.apache.org/dtds/component-loader.xsd">
<load-component component-location="datamodel"/>
<load-component component-location="party"/>
<load-component component-location="securityext"/>

Some files were not shown because too many files have changed in this diff Show More