File tree Expand file tree Collapse file tree 7 files changed +31
-0
lines changed
Expand file tree Collapse file tree 7 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 4949 $ v_charset = $ _POST ['v_charset ' ];
5050 $ v_db_email = $ _POST ['v_db_email ' ];
5151
52+ // Check password length
53+ if (empty ($ _SESSION ['error_msg ' ])) {
54+ $ pw_len = strlen ($ _POST ['v_password ' ]);
55+ if ($ pw_len < 6 ) $ _SESSION ['error_msg ' ] = _ ('Password is too short. ' ,$ error_msg );
56+ }
5257
5358 if (empty ($ _SESSION ['error_msg ' ])) {
5459 // Add Database
Original file line number Diff line number Diff line change 5353 $ _SESSION ['error_msg ' ] = _ ('Field "%s" can not be blank. ' ,$ error_msg );
5454 }
5555
56+ // Check password length
57+ if (empty ($ _SESSION ['error_msg ' ])) {
58+ $ pw_len = strlen ($ _POST ['v_password ' ]);
59+ if ($ pw_len < 6 ) $ _SESSION ['error_msg ' ] = _ ('Password is too short. ' ,$ error_msg );
60+ }
61+
5662 if (empty ($ _SESSION ['error_msg ' ])) {
5763 exec (VESTA_CMD ."v-add-user " .$ v_username ." " .$ v_password ." " .$ v_email ." " .$ v_package ." " .$ v_fname ." " .$ v_lname , $ output , $ return_var );
5864 if ($ return_var != 0 ) {
Original file line number Diff line number Diff line change 7070 $ _SESSION ['error_msg ' ] = _ ('Please enter valid email address. ' );
7171 }
7272
73+ // Check ftp password length
74+ if (empty ($ _SESSION ['error_msg ' ])) {
75+ if (!empty ($ _POST ['v_ftp_user ' ]) {
76+ $ pw_len = strlen ($ _POST ['v_ftp_password ' ]);
77+ if ($ pw_len < 6 ) $ _SESSION ['error_msg ' ] = _ ('Password is too short. ' ,$ error_msg );
78+ }
79+ }
80+
81+ // Check stats password length
82+ if (empty ($ _SESSION ['error_msg ' ])) {
83+ if (!empty ($ _POST ['v_stats_user ' ]) {
84+ $ pw_len = strlen ($ _POST ['v_stats_password ' ]);
85+ if ($ pw_len < 6 ) $ _SESSION ['error_msg ' ] = _ ('Password is too short. ' ,$ error_msg );
86+ }
87+ }
88+
7389 // Check for errors
7490 if (!empty ($ errors [0 ])) {
7591 foreach ($ errors as $ i => $ error ) {
Original file line number Diff line number Diff line change 362362 'Passwords not match ' => 'Passwords not match ' ,
363363 'Please enter valid email address. ' => 'Please enter valid email address. ' ,
364364 'Field "%s" can not be blank. ' => 'Field "%s" can not be blank. ' ,
365+ 'Password is too short. ' => 'Password is too short (minimum is 6 characters) ' ,
365366 'Error code: ' => 'Error code: %s ' ,
366367 'SERVICE_ACTION_FAILED ' => '"%s" "%s" failed ' ,
367368 'IP address is in use ' => 'IP address is in use ' ,
Original file line number Diff line number Diff line change 361361 'Passwords not match ' => 'Las contraseñas no coinciden ' ,
362362 'Please enter valid email address. ' => 'Por favor ingrese un correo válido. ' ,
363363 'Field "%s" can not be blank. ' => 'El campo "%s" no puede estar en blanco. ' ,
364+ 'Password is too short. ' => "La contraseña es demasiado corta (mínima es de 6 caracteres) " ,
364365 'Error code: ' => 'Código de Error: ' ,
365366 'SERVICE_ACTION_FAILED ' => '"%s" "%s" fallo ' ,
366367 'IP address is in use ' => 'La IP esta en uso ' ,
Original file line number Diff line number Diff line change 363363 'Passwords not match ' => 'Пароли не совпадают ' ,
364364 'Please enter valid email address. ' => 'Пожалуйста, введите реальный email адрес. ' ,
365365 'Field "%s" can not be blank. ' => 'Поле "%s" не может быть пустым. ' ,
366+ 'Password is too short. ' => 'Пароль слишком короткий. Используйте не менее 6 символов. ' ,
366367 'Error code: ' => 'Код ошибки: %s ' ,
367368 'SERVICE_ACTION_FAILED ' => 'Не удалось "%s" "%s" ' ,
368369 'IP address is in use ' => 'IP адрес используется ' ,
Original file line number Diff line number Diff line change 363363 'Passwords not match ' => 'Паролі не збігаються ' ,
364364 'Please enter valid email address. ' => 'Будь-ласка, введіть реальну email адресу. ' ,
365365 'Field "%s" can not be blank. ' => 'Поле "%s" не може бути пустим. ' ,
366+ 'Password is too short. ' => 'Пароль занадто короткий. Використовуйте не менше 6 символів. ' ,
366367 'Error code: ' => 'Код помилки: %s ' ,
367368 'SERVICE_ACTION_FAILED ' => 'Не вдалось "%s" "%s" ' ,
368369 'IP address is in use ' => 'IP адреса використовується ' ,
You can’t perform that action at this time.
0 commit comments