You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2019/07/03 13:30:28 UTC
svn commit: r1862466 - in /ofbiz:
ofbiz-framework/trunk/applications/party/config/PartyUiLabels.xml
ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml
Author: jleroux
Date: Wed Jul 3 13:30:28 2019
New Revision: 1862466
URL: http://svn.apache.org/viewvc?rev=1862466&view=rev
Log:
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-framework/trunk/applications/party/config/PartyUiLabels.xml
ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml
Modified: ofbiz/ofbiz-framework/trunk/applications/party/config/PartyUiLabels.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/applications/party/config/PartyUiLabels.xml?rev=1862466&r1=1862465&r2=1862466&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/applications/party/config/PartyUiLabels.xml (original)
+++ ofbiz/ofbiz-framework/trunk/applications/party/config/PartyUiLabels.xml Wed Jul 3 13:30:28 2019
@@ -14060,4 +14060,25 @@
<value xml:lang="zh">æ¾ä¸å°é®æ¿ç¼ç </value>
<value xml:lang="zh-TW">æ¾ä¸å°éµéåè</value>
</property>
+ <property key="NotValidUserName">
+ <value xml:lang="ar">ÙÙ
ÙÙ Ø£Ù ÙØØªÙ٠اسÙ
اÙÙ
ستخدÙ
عÙÙ ØØ±ÙÙ Ø£Ø¨Ø¬Ø¯ÙØ© ÙØ£Ø±ÙاÙ
Ù _-</value>
+ <value xml:lang="cs">Uživatelské jméno může obsahovat pouze abecedy, ÄÃslice a _-</value>
+ <value xml:lang="de">Der Benutzername darf nur Buchstaben, Zahlen und _- enthalten.</value>
+ <value xml:lang="en">Username can only have alphabets, numeric and _-</value>
+ <value xml:lang="en-GB">Username can only have alphabets, numeric and _-</value>
+ <value xml:lang="es">El nombre de usuario solo puede tener alfabetos, numéricos y _-</value>
+ <value xml:lang="fr">Le nom d'utilisateur ne peut contenir que des alphabets, des chiffres et des caractères _-</value>
+ <value xml:lang="hi-IN">â à¤à¤ªà¤¯à¥à¤à¤à¤°à¥à¤¤à¤¾ नाम मà¥à¤ à¤à¥à¤µà¤² à¤
à¤à¥à¤·à¤°, सà¤à¤à¥à¤¯à¤¾à¤¤à¥à¤®à¤ à¤à¤° _- हॠसà¤à¤¤à¥ हà¥à¤</value>
+ <value xml:lang="it">Il nome utente può contenere solo alfabeti, numeri e _-</value>
+ <value xml:lang="ja">ã¦ã¼ã¶ã¼åã«ã¯ãã¢ã«ãã¡ããããæ°åãããã³_-ãã使ç¨ã§ãã¾ããã</value>
+ <value xml:lang="nl">Gebruikersnaam kan alleen alfabetten, numeriek en _- bevatten</value>
+ <value xml:lang="pt-BR">O nome de usuário só pode ter alfabetos, numéricos e _</value>
+ <value xml:lang="pt-PT">O nome de usuário só pode ter alfabetos, numéricos e _</value>
+ <value xml:lang="ro">Numele de utilizator poate avea numai alfabete, numere numerice Èi _</value>
+ <value xml:lang="ru">ÐÐ¼Ñ Ð¿Ð¾Ð»ÑзоваÑÐµÐ»Ñ Ð¼Ð¾Ð¶ÐµÑ ÑодеÑжаÑÑ ÑолÑко бÑквÑ, ÑиÑÑÑ Ð¸ _-</value>
+ <value xml:lang="th">à¸à¸·à¹à¸à¸à¸¹à¹à¹à¸à¹à¸à¸°à¸à¹à¸à¸à¸¡à¸µà¸à¸±à¸§à¸à¸±à¸à¸©à¸£à¸à¸±à¸§à¹à¸¥à¸à¹à¸¥à¸° _- à¹à¸à¹à¸²à¸à¸±à¹à¸</value>
+ <value xml:lang="vi">Tên ngưá»i dùng chá» có thá» có bảng chữ cái, sá» và _-</value>
+ <value xml:lang="zh">ç¨æ·ååªè½æåæ¯ï¼æ°åå_-</value>
+ <value xml:lang="zh-TW">ç¨æ¶ååªè½æåæ¯ï¼æ¸åå_-</value>
+ </property>
</resource>
\ No newline at end of file
Modified: ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml?rev=1862466&r1=1862465&r2=1862466&view=diff
==============================================================================
--- ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml (original)
+++ ofbiz/ofbiz-plugins/trunk/ecommerce/minilang/customer/CustomerEvents.xml Wed Jul 3 13:30:28 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">