asipto / siremis

Web Admin Interface for Kamailio
http://www.siremis.org
99 stars 47 forks source link

Error when password ends with a non-alphanumeric character #19

Closed imcdona closed 7 years ago

imcdona commented 7 years ago

Entering a password that ends in a non-alphanumeric character such as +%$! etc results in the following error:

[2017-06-09 15:34:09 (GMT)] An exception occurred while executing this script:
Error message: #256, EVAL: $ret = password!, 4, 20; 
Script name and line number of error: /var/www/siremis/openbiz/bin/Expression.php:384

function: errorHandler ( 256, "EVAL: $ret = password!, 4, 20; ", "/var/www/siremis/openbiz/bin/Expression.php", 384, Array(6) ) @ /var/www/siremis/openbiz/bin/sysheader.inc 117 
function: userErrorHandler ( 256, "EVAL: $ret = password!, 4, 20; ", "/var/www/siremis/openbiz/bin/Expression.php", 384, Array(6) ) @ 
function: trigger_error ( "EVAL: $ret = password!, 4, 20; ", 256 ) @ /var/www/siremis/openbiz/bin/Expression.php 384 
function: eval_syntax ( "$ret = password!, 4, 20;" ) @ /var/www/siremis/openbiz/bin/Expression.php 327 
function: evaluateExpression ( "{[fld_password], 4, 20}", Object(UserForm) ) @ /var/www/siremis/openbiz/bin/Expression.php 190 
function: replaceVarExpr ( "@validate:betweenLength([fld_password], 4, 20)", Object(UserForm) ) @ /var/www/siremis/openbiz/bin/Expression.php 311 
function: evaluateExpression ( "{@validate:betweenLength([fld_password], 4, 20)}", Object(UserForm) ) @ /var/www/siremis/openbiz/bin/easy/element/Element.php 472 
function: validate ( ) @ /var/www/siremis/openbiz/bin/easy/EasyForm.php 1370 
function: validateForm ( ) @ /var/www/siremis/siremis/modules/system/form/UserForm.php 146 
function: validateForm ( ) @ /var/www/siremis/siremis/modules/system/form/UserForm.php 106 
function: UpdateUser ( ) @ /var/www/siremis/openbiz/bin/BizController.php 310 
function: invoke ( ) @ /var/www/siremis/openbiz/bin/BizController.php 110 
function: dispatchRequest ( ) @ /var/www/siremis/openbiz/bin/BizController.php 32 
function: include_once ( "/var/www/siremis/openbiz/bin/BizController.php" ) @ /var/www/siremis/siremis/bin/controller.php 6

Steps to reproduce: 1. Go to Users ---> User Management 2. Click Add to add a new user or click on an existing user and then select edit. 3. In the password field enter a password that ends in a non-alphanumeric character such as password! and then click save. 4. A popup window is displayed indicating an exception occured

miconda commented 7 years ago

Can you try with the patch referenced above or master branch?

miconda commented 7 years ago

Closing, if the issue is still there after the commit referenced above, reopen or create a new issue.