Commit Graph
256 Commits
Author SHA1 Message Date
Jacques Le Roux a0f7e77e77 Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
Removes all error*.jsp reference, no longer used
2020-07-20 19:27:23 +02:00
Jacques Le Roux 899d3061fe Improved: Use Error.ftl everywhere it's not yet used (OFBIZ-11890)
The ecommerce and webpos controller missed an errorpage reference.
All other controllers either use directly the common-controller or indirectly by
including controller/s that include the common-controller
2020-07-18 11:15:18 +02:00
Suraj Khurana 2144763bc0 Improved: Corrected all checkstyle formatting issues: 'typecast' is not followed by whitespace in plugins component.
(OFBIZ-11887)
2020-07-18 12:26:04 +05:30
Jacques Le Roux df8b8213ff Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
Those are no longer needed, replaced by error.ftl
2020-07-16 17:14:42 +02:00
Jacques Le Roux a50442d121 Improved: User Error.ftl everywhere it's not yet used (OFBIZ-11890)
At https://markmail.org/message/n76cchtriexxmgm7 I asked

Why having the ftl handlers only in webtools controller? BTW it makes the XSD
documentation awkward because it speaks about the ftl handlers being in
handlers-controller.xml
Why not using error.ftl in common-controller.xml instead of error.jsp?
Same question for plugins.

And answered

I believe we could change all that and definitely get rid of error.jsp
(error.ftl is already in all supported releases branches)
2020-07-15 20:56:23 +02:00
Suraj Khurana e7ead3697f Improved: Corrected all checkstyle formatting issues: Line has trailing spaces in plugins component.
(OFBIZ-11880)
Thanks Jacques for review.
2020-07-13 14:14:42 +05:30
Suraj Khurana b18669cddc Improved: Corrected checkstyle formatting issues, 'is preceded/not preceded with whitespace' for plugins component.
(OFBIZ-11874)
This fixes following checkstyle issues:
'{' is not preceded with whitespace.

'{' is not followed by whitespace.

'}' is not followed by whitespace.

'}' is not preceded with whitespace.

'typecast' is not followed by whitespace.

'try' is not followed by whitespace.

';' is preceded with whitespace.
2020-07-11 14:27:09 +05:30
Suraj Khurana ae31c01fa7 Improved: Change resources with proper naming convention in all plugin components.
(OFBIZ-11739)
Also, made MODULE as private data member of class instead of public. Thanks Jacques for review.
2020-05-29 13:14:02 +05:30
James Yong ca5e6b45f1 Improved: Apply multi-block attr to each application (OFBIZ-11706)
For remaining plugin applications.
2020-05-16 13:37:43 +08:00
Jacques Le Roux 208ef1b1be Improved: replaces module by MODULE everywhere 2020-04-06 12:14:23 +02:00
Jacques Le Roux d267d161e0 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:00 +01:00
Michael Brohl d5731824c2 Implemented: Remove the user login security question.
(OFBIZ-11244)

Thanks Wiebke Pätzold for providing the patch.
2020-03-13 17:35:45 +01:00
Mathieu Lirzin 1158664ba3 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

A schema conformance issue has been fixed in ecommerce “web.xml”.
2019-12-07 22:52:30 +01:00
Jacopo Cappellato e49b345808 Fixed: Add missing view permissions checks to various screens. 2019-11-15 19:24:22 +01:00
Jacques Le Roux fbbd9d893f Improved: no functional change
In r1868022 I added the POS_SALES_CHANNEL was suggested in OFBIZ-10965. Actually
that was wrong. Tt's already in PosTypeData.xml though with a wrong sequenceId

This fixes it


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1868023 13f79535-47bb-0310-9956-ffa450edef68
2019-10-05 14:23:17 +00:00
Mathieu Lirzin 237a2fc8f7 Improved: Do not use ‘UtilMisc#toList’
(OFBIZ-11140)


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1863390 13f79535-47bb-0310-9956-ffa450edef68
2019-07-19 13:38:49 +00:00
Jacques Le Roux f3c3271d12 Improved: Use Groovy Truth instead of UtilValidate Class in Groovy
(OFBIZ-11064)

As we all know, Groovy is a powerful language with great built-in functions. 
Groovy Truth[1] is one of them, which is not used properly in our code base. 
We have used UtilValidate Class to validate arguments for Empty or NotEmpty, 
which can easily be done in groovy with built-in functionality[1].
 
Current Code: if (UtilValidate.isNotEmpty(locations)) { ... }
Groovy Built-in Code: if (locations) { ... }
 
[1] - http://groovy-lang.org/semantics.html#Groovy-Truth
 
We need to careful for some points while we change this:
Like:
maxRetry = 0
if (!maxRetry)
{  // Not set, use a default  maxRetry = -1 }

Because groovy evaluates zero to be false, it wouldn't be possible to set
maxRetry to zero.  So it's best not to use groovy truth for null-checks on
numbers in some cases. 
 
Thanks: Pawan Verma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860051 13f79535-47bb-0310-9956-ffa450edef68
2019-05-26 10:36:16 +00:00
Mathieu Lirzin 9354ac2997 Improved: Remove redundant type declarations
(OFBIZ-10937)

Since Java 1.7, when defining generic types it is unnecessary to
redefine those types in the constructor when it is already done in the
declared type.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1860025 13f79535-47bb-0310-9956-ffa450edef68
2019-05-25 23:42:00 +00:00
Jacques Le Roux 94c278ed63 Fixed: Touch F8 in webpos does not work and generate an error
(OFBIZ-11010)

Adds missing data for POS_SALES_CHANNEL fix this issue, was removed in r1754402.

Thanks: Pawan Verma

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1859012 13f79535-47bb-0310-9956-ffa450edef68
2019-05-09 14:32:35 +00:00
Suraj Khurana 62c2ce7ce6 Fixed: Shortkeys missing on WebPOS.
(OFBIZ-10961)
It was broken after jQuery update on rev #1850712.
Thanks Padmavati Rawat for reporting and Rohit Koushal for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1858289 13f79535-47bb-0310-9956-ffa450edef68
2019-04-27 16:36:43 +00:00
Jacques Le Roux 844fc542d8 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-plugins/trunk@1851068 13f79535-47bb-0310-9956-ffa450edef68
2019-01-11 16:12:01 +00:00
Aditya Sharma baabf6b25d 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.
Additional change:
Improved boolean returns with single statement, replacing if blocks with explicit boolean return.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1850712 13f79535-47bb-0310-9956-ffa450edef68
2019-01-08 05:08:40 +00:00
Jacques Le Roux 6a9ede0945 Improved: Themes can't be changed in webpos
(OFBIZ-10767)

Following this discussion on dev ML I decided to test it on Ubuntu in my Windows 
7 VM and it works there. 
Just that you don't automatically get back to the webpos page when changing theme


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1850552 13f79535-47bb-0310-9956-ffa450edef68
2019-01-06 13:51:34 +00:00
Jacques Le Roux f16195f359 Fixed: Correct behaviour of Autologin cookies
(OFBIZ-10635)

Renames "keep-autologin-cookie" to "use-autologin-cookie", and only create 
Autologin cookies when needed. No need to create Autologin cookies in 
applications that don't need it.

Don't pass webAppName to LoginWorker::getSecuredUserLoginId, that can be handled
with improved LoginWorker::getSecuredLoginIdCookieName

Removes LoginWorker::autoLogoutCleanCookies, no longer needed since only those
needed are created and kept (1 year at least after creation).

For both autoLogin and securedLoginId cookies sets the path to the application.


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1845558 13f79535-47bb-0310-9956-ffa450edef68
2018-11-02 09:46:42 +00:00
Suraj Khurana 53ff3ff66e Fixed: Added missing import.
(OFBIZ-10314)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844966 13f79535-47bb-0310-9956-ffa450edef68
2018-10-27 13:21:20 +00:00
Suraj Khurana 6e84e0983f Fixed: Multiple records are shown in search modal in webpos.
(OFBIZ-10314)
Thanks Archana Asthana for reporting and Shikha Jaiswal for providing the patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844957 13f79535-47bb-0310-9956-ffa450edef68
2018-10-27 12:47:45 +00:00
Jacques Le Roux 0cd8756918 Improved: Remove few request-map "edit" attributes in controllers
(OFBIZ-10608)

As documented, currently

    Reserved for future use (not used yet).

I checked, it's still not implemented. So no need to confuse people for now, 
better to remove until it's really used.




git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1844744 13f79535-47bb-0310-9956-ffa450edef68
2018-10-24 08:57:03 +00:00
Aditya Sharma 4703e7f373 Fixed: Webpos Keyboard Shortcut keys does not work correctly
(OFBIZ-7945)
Updated wrong function calls in switch case of activateHotKeys(). As support for Pin Payment transactions is still to be added under OFBIZ-5241. Commented code for Pin payment transaction and updated other shortcuts accordingly.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1841650 13f79535-47bb-0310-9956-ffa450edef68
2018-09-22 05:52:53 +00:00
Suraj Khurana 0d27498587 Improved: Arranged webpos UI labels in alphabetic order.
(OFBIZ-7320)
Thanks Shivangi for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1840665 13f79535-47bb-0310-9956-ffa450edef68
2018-09-12 11:58:17 +00:00
Jacques Le Roux 83bf75872f Improved: Renames setLocaleFromBrowser to SetTimeZoneFromBrowser
everywhere it's needed.
(OFBIZ-10472)

FORGOT IT in WEBPOS!



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1840446 13f79535-47bb-0310-9956-ffa450edef68
2018-09-10 09:52:43 +00:00
Suraj Khurana ac6ba4388b Fixed: Party Search doesn't consider Billing Address and Shipping Address checkbox in WebPos.
(OFBIZ-7709)
Thanks Vishal for your patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837845 13f79535-47bb-0310-9956-ffa450edef68
2018-08-11 06:18:18 +00:00
Suraj Khurana 99fb5202d3 Fixed: Not able to select Virtual Product in WebPos.
(OFBIZ-7719)
Thanks Vishal for your patch.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837796 13f79535-47bb-0310-9956-ffa450edef68
2018-08-10 12:26:48 +00:00
Gil Portenseigne bd389e0fd0 Improved : Remove all unnecessary boxing and unboxing in Java classes
(OFBIZ-10504)

Thanks Taher, Jacques, Mathieu and Rishi for the review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1837578 13f79535-47bb-0310-9956-ffa450edef68
2018-08-07 07:36:13 +00:00
Deepak Dixit 443411cdf4 Improved: Use application/javascript instead of text/javascript
(OFBIZ-10492)
Replace text/javascript with application/javascript in all the script tag

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1836889 13f79535-47bb-0310-9956-ffa450edef68
2018-07-28 11:50:09 +00:00
Deepak Dixit 1f164336e9 Improved: Remove use of deprecated language attribute from script tag
(OFBIZ-10491)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1836546 13f79535-47bb-0310-9956-ffa450edef68
2018-07-24 11:27:20 +00:00
Rishi Solanki c1c14b8e9c Improved: Remove empty field values from xml data files so that it will not override existing data with empty values. Removed all empty data fields from data files plugins components.
(OFBIZ-10282)
Thanks to Arun Patidar for reporting and review.
Thanks to Suraj Khurana for providing patch for the improvement.
Thanks to Jacques for discussion and finalizing the work.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1830546 13f79535-47bb-0310-9956-ffa450edef68
2018-04-30 10:56:31 +00:00
Rishi Solanki 67148d9997 Improved: UI Label Issue on WebPos screen. Removed unnecessary class that was causing text in white colour.
(OFBIZ-10312)
Thanks Archana Asthana for reporting the issue and Pawan Verma for providing fix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1830451 13f79535-47bb-0310-9956-ffa450edef68
2018-04-28 13:31:24 +00:00
Rishi Solanki ec98c96794 Improved: Fields going outside. Fix the alignment and widht to adjust the text box in the window.
(OFBIZ-10316)
Thanks Padmavati Rawat for reporting the issue and Pawan Verma for providing fix.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1830448 13f79535-47bb-0310-9956-ffa450edef68
2018-04-28 12:26:51 +00:00
Jacques Le Roux 683df915aa Fixed: Logout do not remove autoLogin
(OFBIZ-4959)

Logout method do not disable autoLogin functionality. 
Instead of that it just initializes autoLogin in session and request.

jleroux: this was also needed by OFBIZ-10206 "Security issue in Token Based 
Authentication". 
This creates a keep-autologin-cookie boolean attribute in the webapp element of 
the  ofbiz-component.xml, documented in ofbiz-component.xsd
This attribute is used to get the value from the ofbiz-component.xml files in a
new autoLogoutCleanCookies() LoginWorker method. This method is used not only 
when login out but also when login in. This to be sure that in every cases the 
cookies related to the webapps are removed.
For now only the ecommerce, ecomseo et webpos webapps are keeping and using 
their autologin cookies

Thanks: Roberto Benítez Monje for report and Taher for discussion and suggestion

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1824803 13f79535-47bb-0310-9956-ffa450edef68
2018-02-19 19:23:36 +00:00
James Yong dae259b009 Improved: ID should be the abbreviation for identity in English
(OFBIZ-100131)

Also cover non-English translations

Thanks: Jacques for the additional patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1820450 13f79535-47bb-0310-9956-ffa450edef68
2018-01-07 12:11:37 +00:00
Jacques Le Roux 7d9b898e92 Improved: Handle service response effectively
(OFBIZ-9981)

As per discussion on Dev ML:
==========================
Every service calling from java/groovy must handle errors by service util 
methods such as isError, returnError etc. 
and similarly in case of XML <call-service, there should be <check-error/> 
to make sure service was executed successfully.

Apart from this, one suggestion is to include *Debug.logError* in 
*ServiceUtil.returnProblem* so that in case of any error occurred and handled, 
it will always be logged on the console.
==========================

jleroux: this is the plugins part with some slight changes

Thanks: Suraj Khurana and Anushi Gupta

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1819735 13f79535-47bb-0310-9956-ffa450edef68
2017-12-31 12:30:48 +00:00
Jacques Le Roux 7d897896b7 Improved: Fixing defects reported by FindBugs, package
org.apache.ofbiz.securityext.login.
(OFBIZ-9637)

No functional change, missed a compilation issue, 

Thanks: Builbot :)

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1815195 13f79535-47bb-0310-9956-ffa450edef68
2017-11-14 10:06:46 +00:00
Deepak Dixit e82e469e24 Improved: Manage life span of SecurityGroupPermission entity.
Applied patch from jira issue(OFBIZ-9801) Thanks Suraj Khurana for your contribution


git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812384 13f79535-47bb-0310-9956-ffa450edef68
2017-10-17 10:48:43 +00:00
Jacques Le Roux 377e8450c7 Fixed: setLocaleFromBrowser request missing for webpos component
(OFBIZ-9847)

I here revert r1812213 and simply add the required setLocaleFromBrowser 
request-map, the include of the whole common-controller is not needed

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812223 13f79535-47bb-0310-9956-ffa450edef68
2017-10-15 17:12:24 +00:00
Jacques Le Roux 7f385fa6a4 Fixed: setLocaleFromBrowser request missing for webpos component
(OFBIZ-9847)

Step to regenerate:
Login to webpos component (https://localhost:8443/webpos/control/main)
You get an error in logs

Thanks: Aditya

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1812213 13f79535-47bb-0310-9956-ffa450edef68
2017-10-15 06:02:24 +00:00
Jacques Le Roux 646e2e9d47 Improved: Add session tracking mode and make cookie secure
(OFBIZ-6655)

Programmatically replaces the web.xml <session-config> declarations and uses 
the @WebListener annotation to start the process. This avoid to duplicates 
things everywhere in web.xml files. Since the web.xml files have precedence 
on annotations, the setting can be easily overridden when necessary.

Now that we also use HTTPS in ecommerce the ecommerce session cookie is 
also secured.

I also noted that we had 8 weird <session-timeout> declarations:
    in solr component: <session-timeout>2</session-timeout>
    in themes: <session-timeout>1</session-timeout>

Also in Rainbowstone we lacked the <cookie-config> and <tracking-mode> 
declarations. I think it's not good.

I resolve these points by simply removing the <session-config> in web.xml files 
of themes and Solr.

Thanks: Pradhan Yash Sharma  for review

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1811041 13f79535-47bb-0310-9956-ffa450edef68
2017-10-04 07:12:57 +00:00
Arun Patidar bf5a90c3ea FIXED: UI issue on web pos for different themes. (OFBIZ-7253)
Thanks Yogesh Naroliya and Anurag Chandak for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1809405 13f79535-47bb-0310-9956-ffa450edef68
2017-09-23 11:47:55 +00:00
Deepak Dixit 9f4cb137ef Improved:Use from-field pattern instead of value=dollor pattern in 'set' element
Apply slightly modified patch from jira issue, fixed some typo (OFBIZ-9607)
Thanks Suraj Khurana and Rohit Rai for your contribution.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1806327 13f79535-47bb-0310-9956-ffa450edef68
2017-08-26 20:24:09 +00:00
Nicolas Malin 18d3a7e982 Fixed: Consistency and Readability improvements for make-value tag (OFBIZ-8986)
Consistency on the attribute order for make-value element as : entity-name, value-field
Thanks to Ankush Upadhyay and Devanshu Vyas for the issue and the corrective patch

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1805957 13f79535-47bb-0310-9956-ffa450edef68
2017-08-23 20:45:25 +00:00
Deepak Dixit 8e300f2156 Removed duplicated request/view mapping from plugins
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-plugins/trunk@1805756 13f79535-47bb-0310-9956-ffa450edef68
2017-08-22 11:53:02 +00:00