Author: jleroux
Date: Wed Jul 3 13:32:10 2019 New Revision: 1862469 URL: http://svn.apache.org/viewvc?rev=1862469&view=rev Log: "Applied fix from plugins 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 ------------------------------------------------------------------------ Modified: ofbiz/ofbiz-plugins/branches/release18.12/ (props changed) ofbiz/ofbiz-plugins/branches/release18.12/ecommerce/minilang/customer/CustomerEvents.xml Propchange: ofbiz/ofbiz-plugins/branches/release18.12/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Jul 3 13:32:10 2019 @@ -10,4 +10,4 @@ /ofbiz/branches/json-integration-refactoring/plugins:1634077-1635900 /ofbiz/branches/multitenant20100310/plugins:921280-927264 /ofbiz/branches/release13.07/plugins:1547657 -/ofbiz/ofbiz-plugins/trunk:1851002,1851009,1851068,1851135,1851139-1851140,1851185,1851316,1851885,1852988,1853904,1854684,1855082,1855084,1856212,1856802,1856917,1857120,1857173,1858141,1858244,1858265,1858285,1858289,1858312,1859012,1859735,1859893,1859906,1860648,1860801,1861824,1861904,1861986 +/ofbiz/ofbiz-plugins/trunk:1851002,1851009,1851068,1851135,1851139-1851140,1851185,1851316,1851885,1852988,1853904,1854684,1855082,1855084,1856212,1856802,1856917,1857120,1857173,1858141,1858244,1858265,1858285,1858289,1858312,1859012,1859735,1859893,1859906,1860648,1860801,1861824,1861904,1861986,1862466 Modified: ofbiz/ofbiz-plugins/branches/release18.12/ecommerce/minilang/customer/CustomerEvents.xml URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/branches/release18.12/ecommerce/minilang/customer/CustomerEvents.xml?rev=1862469&r1=1862468&r2=1862469&view=diff ============================================================================== --- ofbiz/ofbiz-plugins/branches/release18.12/ecommerce/minilang/customer/CustomerEvents.xml (original) +++ ofbiz/ofbiz-plugins/branches/release18.12/ecommerce/minilang/customer/CustomerEvents.xml Wed Jul 3 13:32:10 2019 @@ -168,6 +168,20 @@ under the License. </if-compare> </else> </if-compare> + <if-compare operator="not-equals" field="parameters.UNUSEEMAIL" value="on"> + <if> + <condition> + <not> + <if-regexp field="parameters.USERNAME" expr="^[a-zA-Z0-9_-]+$"></if-regexp> + </not> + </condition> + <then> + <add-error> + <fail-property resource="PartyUiLabels" property="NotValidUserName"/> + </add-error> + </then> + </if> + </if-compare> <!-- Create the Home Phone --> <if-not-empty field="parameters.CUSTOMER_HOME_CONTACT"> |
Free forum by Nabble | Edit this page |