diff options
39 files changed, 135 insertions, 190 deletions
diff --git a/phpBB/adm/style/acp_attachments.html b/phpBB/adm/style/acp_attachments.html index 6129d6a1a5..7a66f170ac 100644 --- a/phpBB/adm/style/acp_attachments.html +++ b/phpBB/adm/style/acp_attachments.html @@ -110,7 +110,7 @@ <!-- ELSEIF S_EXTENSION_GROUPS --> <!-- IF S_EDIT_GROUP --> - <script type="text/javascript" defer="defer"> + <script> // <![CDATA[ function update_image(newimage) { diff --git a/phpBB/adm/style/acp_ban.html b/phpBB/adm/style/acp_ban.html index f2249941a5..d0eab75ad8 100644 --- a/phpBB/adm/style/acp_ban.html +++ b/phpBB/adm/style/acp_ban.html @@ -8,7 +8,7 @@ <p>{L_EXPLAIN}</p> -<script type="text/javascript"> +<script> // <![CDATA[ var ban_length = new Array(); diff --git a/phpBB/adm/style/acp_contact.html b/phpBB/adm/style/acp_contact.html index f1752d0055..c46a2d7fed 100644 --- a/phpBB/adm/style/acp_contact.html +++ b/phpBB/adm/style/acp_contact.html @@ -1,6 +1,6 @@ <!-- INCLUDE overall_header.html --> -<script type="text/javascript"> +<script> // <![CDATA[ var form_name = 'acp_contact'; diff --git a/phpBB/adm/style/acp_database.html b/phpBB/adm/style/acp_database.html index cc0b57b411..d3433a8aa6 100644 --- a/phpBB/adm/style/acp_database.html +++ b/phpBB/adm/style/acp_database.html @@ -35,7 +35,7 @@ <p>{L_ACP_BACKUP_EXPLAIN}</p> - <script type="text/javascript"> + <script> // <![CDATA[ function selector(bool) diff --git a/phpBB/adm/style/acp_forums.html b/phpBB/adm/style/acp_forums.html index 965438ff67..20bcd2e9f9 100644 --- a/phpBB/adm/style/acp_forums.html +++ b/phpBB/adm/style/acp_forums.html @@ -4,7 +4,7 @@ <!-- IF S_EDIT_FORUM --> - <script type="text/javascript"> + <script> // <![CDATA[ /** * Handle displaying/hiding several options based on the forum type @@ -405,7 +405,7 @@ <!-- ELSEIF S_CONTINUE_SYNC --> - <script type="text/javascript"> + <script> // <![CDATA[ var close_waitscreen = 0; // no scrollbars... @@ -421,7 +421,7 @@ <!-- ELSE --> - <script type="text/javascript"> + <script> // <![CDATA[ /** * Popup search progress bar @@ -447,7 +447,7 @@ <!-- ENDIF --> <!-- IF S_RESYNCED --> - <script type="text/javascript"> + <script> // <![CDATA[ var close_waitscreen = 1; // ]]> diff --git a/phpBB/adm/style/acp_icons.html b/phpBB/adm/style/acp_icons.html index 5493cbde0a..45fe7f8ebc 100644 --- a/phpBB/adm/style/acp_icons.html +++ b/phpBB/adm/style/acp_icons.html @@ -4,7 +4,7 @@ <!-- IF S_EDIT --> - <script type="text/javascript" defer="defer"> + <script> // <![CDATA[ <!-- IF S_ADD_CODE --> diff --git a/phpBB/adm/style/acp_modules.html b/phpBB/adm/style/acp_modules.html index 3c97706e6a..f4040daaed 100644 --- a/phpBB/adm/style/acp_modules.html +++ b/phpBB/adm/style/acp_modules.html @@ -4,7 +4,7 @@ <!-- IF S_EDIT_MODULE --> - <script type="text/javascript"> + <script> // <![CDATA[ function display_options(value) { diff --git a/phpBB/adm/style/acp_permission_roles.html b/phpBB/adm/style/acp_permission_roles.html index b3137f134c..670d5e14c0 100644 --- a/phpBB/adm/style/acp_permission_roles.html +++ b/phpBB/adm/style/acp_permission_roles.html @@ -4,7 +4,7 @@ <!-- IF S_EDIT --> - <script type="text/javascript"> + <script> // <![CDATA[ var active_pmask = '0'; var active_fmask = '0'; @@ -20,7 +20,7 @@ // ]]> </script> - <script type="text/javascript" src="style/permissions.js"></script> + <script src="style/permissions.js"></script> <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> diff --git a/phpBB/adm/style/acp_posting_buttons.html b/phpBB/adm/style/acp_posting_buttons.html index 36fc285537..614d6fae40 100644 --- a/phpBB/adm/style/acp_posting_buttons.html +++ b/phpBB/adm/style/acp_posting_buttons.html @@ -1,4 +1,4 @@ -<script type="text/javascript"> +<script> // <![CDATA[ // Define the bbCode tags diff --git a/phpBB/adm/style/acp_ranks.html b/phpBB/adm/style/acp_ranks.html index e67c9acd80..d373657114 100644 --- a/phpBB/adm/style/acp_ranks.html +++ b/phpBB/adm/style/acp_ranks.html @@ -6,7 +6,7 @@ <a href="{U_BACK}" style="float: {S_CONTENT_FLOW_END};">« {L_BACK}</a> - <script type="text/javascript"> + <script> // <![CDATA[ function update_image(newimage) { diff --git a/phpBB/adm/style/acp_search.html b/phpBB/adm/style/acp_search.html index f7ad3c5e89..99620058dc 100644 --- a/phpBB/adm/style/acp_search.html +++ b/phpBB/adm/style/acp_search.html @@ -69,7 +69,7 @@ <!-- ELSEIF S_INDEX --> - <script type="text/javascript"> + <script> // <![CDATA[ /** * Popup search progress bar diff --git a/phpBB/adm/style/acp_users_overview.html b/phpBB/adm/style/acp_users_overview.html index 506101c3f7..2af669a41f 100644 --- a/phpBB/adm/style/acp_users_overview.html +++ b/phpBB/adm/style/acp_users_overview.html @@ -79,7 +79,7 @@ <!-- IF not S_USER_FOUNDER or S_FOUNDER --> - <script type="text/javascript"> + <script> // <![CDATA[ function display_reason(option) diff --git a/phpBB/adm/style/acp_users_prefs.html b/phpBB/adm/style/acp_users_prefs.html index 484c5b3976..358f3d5248 100644 --- a/phpBB/adm/style/acp_users_prefs.html +++ b/phpBB/adm/style/acp_users_prefs.html @@ -1,4 +1,4 @@ -<script type="text/javascript"> +<script> // <![CDATA[ var default_dateformat = '{A_DEFAULT_DATEFORMAT}'; // ]]> diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html index 2e57700fd1..40f0fc25d9 100644 --- a/phpBB/adm/style/acp_users_signature.html +++ b/phpBB/adm/style/acp_users_signature.html @@ -1,4 +1,4 @@ -<script type="text/javascript"> +<script> // <![CDATA[ var form_name = 'user_signature'; diff --git a/phpBB/adm/style/installer_footer.html b/phpBB/adm/style/installer_footer.html index 54e6951a12..8b3b04d8a5 100644 --- a/phpBB/adm/style/installer_footer.html +++ b/phpBB/adm/style/installer_footer.html @@ -13,7 +13,7 @@ </div> </div> -<script type="text/javascript"> +<script> <!-- installLang = { title: '{LA_TIMEOUT_DETECTED_TITLE}', @@ -22,9 +22,9 @@ installLang = { //--> </script> -<script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js">\x3C/script>');</script><!-- ENDIF --> -<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> +<script src="{T_JQUERY_LINK}"></script> +<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js">\x3C/script>');</script><!-- ENDIF --> +<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS admin.js --> {$SCRIPTS} diff --git a/phpBB/adm/style/overall_footer.html b/phpBB/adm/style/overall_footer.html index 8745286d64..3ab633e04b 100644 --- a/phpBB/adm/style/overall_footer.html +++ b/phpBB/adm/style/overall_footer.html @@ -33,9 +33,9 @@ </div> </div> -<script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> -<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> +<script src="{T_JQUERY_LINK}"></script> +<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> +<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- INCLUDEJS ajax.js --> <!-- INCLUDEJS admin.js --> diff --git a/phpBB/adm/style/overall_header.html b/phpBB/adm/style/overall_header.html index 8279ac34dc..fa361d6016 100644 --- a/phpBB/adm/style/overall_header.html +++ b/phpBB/adm/style/overall_header.html @@ -10,7 +10,7 @@ <link href="{T_FONT_AWESOME_LINK}" rel="stylesheet"> <link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" /> -<script type="text/javascript"> +<script> // <![CDATA[ var jump_page = '{LA_JUMP_PAGE}{L_COLON}'; var on_page = '{CURRENT_PAGE}'; diff --git a/phpBB/adm/style/permission_mask.html b/phpBB/adm/style/permission_mask.html index 23294d60df..26aa5e098f 100644 --- a/phpBB/adm/style/permission_mask.html +++ b/phpBB/adm/style/permission_mask.html @@ -1,5 +1,5 @@ -<script type="text/javascript"> +<script> // <![CDATA[ var active_pmask = '0'; var active_fmask = '0'; @@ -16,7 +16,7 @@ <!-- ENDIF --> // ]]> </script> -<script type="text/javascript" src="style/permissions.js"></script> +<script src="style/permissions.js"></script> <!-- BEGIN p_mask --> <div class="clearfix"></div> diff --git a/phpBB/adm/style/progress_bar.html b/phpBB/adm/style/progress_bar.html index 1822675c15..1e58257ff0 100644 --- a/phpBB/adm/style/progress_bar.html +++ b/phpBB/adm/style/progress_bar.html @@ -1,6 +1,6 @@ <!-- INCLUDE simple_header.html --> -<script type="text/javascript"> +<script> // <![CDATA[ /** * Close previously opened popup @@ -31,7 +31,7 @@ <p>{L_PROGRESS_EXPLAIN}</p> </div> -<script type="text/javascript"> +<script> // <![CDATA[ close_popup(); // ]]> diff --git a/phpBB/adm/style/simple_footer.html b/phpBB/adm/style/simple_footer.html index 08ee0a739f..4b54b83373 100644 --- a/phpBB/adm/style/simple_footer.html +++ b/phpBB/adm/style/simple_footer.html @@ -16,9 +16,9 @@ </div> -<script type="text/javascript" src="{T_JQUERY_LINK}"></script> -<!-- IF S_ALLOW_CDN --><script type="text/javascript">window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> -<script type="text/javascript" src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> +<script src="{T_JQUERY_LINK}"></script> +<!-- IF S_ALLOW_CDN --><script>window.jQuery || document.write('\x3Cscript src="{T_ASSETS_PATH}/javascript/jquery.min.js?assets_version={T_ASSETS_VERSION}">\x3C/script>');</script><!-- ENDIF --> +<script src="{T_ASSETS_PATH}/javascript/core.js?assets_version={T_ASSETS_VERSION}"></script> <!-- EVENT acp_simple_footer_after --> {$SCRIPTS} diff --git a/phpBB/adm/style/simple_header.html b/phpBB/adm/style/simple_header.html index 439645a211..a8a32bf768 100644 --- a/phpBB/adm/style/simple_header.html +++ b/phpBB/adm/style/simple_header.html @@ -9,7 +9,7 @@ <link href="style/admin.css?assets_version={T_ASSETS_VERSION}" rel="stylesheet" type="text/css" media="screen" /> -<script type="text/javascript"> +<script> // <![CDATA[ var jump_page = '{LA_JUMP_PAGE}{L_COLON}'; var on_page = '{CURRENT_PAGE}'; diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index 7cbd0903bd..05871e4157 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -254,7 +254,6 @@ class acp_board 'vars' => array( 'legend1' => 'GENERAL_SETTINGS', 'max_name_chars' => array('lang' => 'USERNAME_LENGTH', 'validate' => 'int:8:180', 'type' => false, 'method' => false, 'explain' => false,), - 'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,), 'require_activation' => array('lang' => 'ACC_ACTIVATION', 'validate' => 'int', 'type' => 'select', 'method' => 'select_acc_activation', 'explain' => true), 'new_member_post_limit' => array('lang' => 'NEW_MEMBER_POST_LIMIT', 'validate' => 'int:0:255', 'type' => 'number:0:255', 'explain' => true, 'append' => ' ' . $user->lang['POSTS']), @@ -417,7 +416,6 @@ class acp_board 'remote_upload_verify' => array('lang' => 'UPLOAD_CERT_VALID', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'check_dnsbl' => array('lang' => 'CHECK_DNSBL', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), 'email_check_mx' => array('lang' => 'EMAIL_CHECK_MX', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true), - 'max_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:8:255', 'type' => false, 'method' => false, 'explain' => false,), 'min_pass_chars' => array('lang' => 'PASSWORD_LENGTH', 'validate' => 'int:1', 'type' => 'custom', 'method' => 'password_length', 'explain' => true), 'pass_complex' => array('lang' => 'PASSWORD_TYPE', 'validate' => 'string', 'type' => 'select', 'method' => 'select_password_chars', 'explain' => true), 'chg_passforce' => array('lang' => 'FORCE_PASS_CHANGE', 'validate' => 'int:0:999', 'type' => 'number:0:999', 'explain' => true, 'append' => ' ' . $user->lang['DAYS']), @@ -895,13 +893,13 @@ class acp_board } /** - * Maximum/Minimum password length + * Minimum password length */ function password_length($value, $key) { global $user; - return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . ' <input type="number" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS']; + return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS']; } /** diff --git a/phpBB/includes/acp/acp_users.php b/phpBB/includes/acp/acp_users.php index fd4b5e8c24..1b66943490 100644 --- a/phpBB/includes/acp/acp_users.php +++ b/phpBB/includes/acp/acp_users.php @@ -844,9 +844,9 @@ class acp_users // Validation data - we do not check the password complexity setting here $check_ary = array( 'new_password' => array( - array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), + array('string', true, $config['min_pass_chars'], 0), array('password')), - 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), + 'password_confirm' => array('string', true, $config['min_pass_chars'], 0), ); // Check username if altered @@ -1130,7 +1130,7 @@ class acp_users $template->assign_vars(array( 'L_NAME_CHARS_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])), - 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])), + 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])), 'L_POSTS_IN_QUEUE' => $user->lang('NUM_POSTS_IN_QUEUE', $user_row['posts_in_queue']), 'S_FOUNDER' => ($user->data['user_type'] == USER_FOUNDER) ? true : false, diff --git a/phpBB/includes/questionnaire/questionnaire.php b/phpBB/includes/questionnaire/questionnaire.php index f5a56fda82..95036a95bc 100644 --- a/phpBB/includes/questionnaire/questionnaire.php +++ b/phpBB/includes/questionnaire/questionnaire.php @@ -402,7 +402,6 @@ class phpbb_questionnaire_phpbb_data_provider 'max_login_attempts' => true, 'max_name_chars' => true, 'max_num_search_keywords' => true, - 'max_pass_chars' => true, 'max_poll_options' => true, 'max_post_chars' => true, 'max_post_font_size' => true, diff --git a/phpBB/includes/ucp/ucp_profile.php b/phpBB/includes/ucp/ucp_profile.php index 36ab3d0463..6d98362e08 100644 --- a/phpBB/includes/ucp/ucp_profile.php +++ b/phpBB/includes/ucp/ucp_profile.php @@ -70,9 +70,9 @@ class ucp_profile // Do not check cur_password, it is the old one. $check_ary = array( 'new_password' => array( - array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), + array('string', true, $config['min_pass_chars'], 0), array('password')), - 'password_confirm' => array('string', true, $config['min_pass_chars'], $config['max_pass_chars']), + 'password_confirm' => array('string', true, $config['min_pass_chars'], 0), 'email' => array( array('string', false, 6, 60), array('user_email')), @@ -267,7 +267,7 @@ class ucp_profile 'CUR_PASSWORD' => '', 'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])), - 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])), + 'L_CHANGE_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])), 'S_FORCE_PASSWORD' => ($auth->acl_get('u_chgpasswd') && $config['chg_passforce'] && $user->data['user_passchg'] < time() - ($config['chg_passforce'] * 86400)) ? true : false, 'S_CHANGE_USERNAME' => ($config['allow_namechange'] && $auth->acl_get('u_chgname')) ? true : false, diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php index 0e3ff50268..97d2631224 100644 --- a/phpBB/includes/ucp/ucp_register.php +++ b/phpBB/includes/ucp/ucp_register.php @@ -275,9 +275,9 @@ class ucp_register array('string', false, $config['min_name_chars'], $config['max_name_chars']), array('username', '')), 'new_password' => array( - array('string', false, $config['min_pass_chars'], $config['max_pass_chars']), + array('string', false, $config['min_pass_chars'], 0), array('password')), - 'password_confirm' => array('string', false, $config['min_pass_chars'], $config['max_pass_chars']), + 'password_confirm' => array('string', false, $config['min_pass_chars'], 0), 'email' => array( array('string', false, 6, 60), array('user_email')), @@ -638,7 +638,7 @@ class ucp_register 'L_REG_COND' => $l_reg_cond, 'L_USERNAME_EXPLAIN' => $user->lang($config['allow_name_chars'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_name_chars']), $user->lang('CHARACTERS', (int) $config['max_name_chars'])), - 'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars']), $user->lang('CHARACTERS', (int) $config['max_pass_chars'])), + 'L_PASSWORD_EXPLAIN' => $user->lang($config['pass_complex'] . '_EXPLAIN', $user->lang('CHARACTERS', (int) $config['min_pass_chars'])), 'S_LANG_OPTIONS' => language_select($data['lang']), 'S_TZ_PRESELECT' => !$submit, diff --git a/phpBB/install/schemas/schema_data.sql b/phpBB/install/schemas/schema_data.sql index 2854f71606..f859d1674e 100644 --- a/phpBB/install/schemas/schema_data.sql +++ b/phpBB/install/schemas/schema_data.sql @@ -206,7 +206,6 @@ INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_filesize_pm', INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_login_attempts', '3'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_name_chars', '20'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_num_search_keywords', '10'); -INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_pass_chars', '100'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_poll_options', '10'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_chars', '60000'); INSERT INTO phpbb_config (config_name, config_value) VALUES ('max_post_font_size', '200'); diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php index 5f47fbe6ed..d050c1b109 100644 --- a/phpBB/language/en/common.php +++ b/phpBB/language/en/common.php @@ -530,7 +530,7 @@ $lang = array_merge($lang, array( 'NO_POSTS_TIME_FRAME' => 'No posts exist inside this topic for the selected time frame.', 'NO_FEED_ENABLED' => 'Feeds are not available on this board.', 'NO_FEED' => 'The requested feed is not available.', - 'NO_STYLE_DATA' => 'Could not get style data', + 'NO_STYLE_DATA' => 'Could not get style data for user_style %s and set for user_id %s', 'NO_STYLE_CFG' => 'Could not get the style configuration file for: %s', 'NO_SUBJECT' => 'No subject specified', // Used for posts having no subject defined but displayed within management pages. 'NO_SUCH_SEARCH_MODULE' => 'The specified search backend doesn’t exist.', diff --git a/phpBB/language/en/ucp.php b/phpBB/language/en/ucp.php index 542d814911..57319ae26b 100644 --- a/phpBB/language/en/ucp.php +++ b/phpBB/language/en/ucp.php @@ -410,10 +410,10 @@ $lang = array_merge($lang, array( 'NO_WATCHED_SELECTED' => 'You have not selected any subscribed topics or forums.', 'NO_WATCHED_TOPICS' => 'You are not subscribed to any topics.', - 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be between %1$s and %2$s long, must contain letters in mixed case and must contain numbers.', - 'PASS_TYPE_ANY_EXPLAIN' => 'Must be between %1$s and %2$s.', - 'PASS_TYPE_CASE_EXPLAIN' => 'Password must be between %1$s and %2$s long and must contain letters in mixed case.', - 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be between %1$s and %2$s long, must contain letters in mixed case, must contain numbers and must contain symbols.', + 'PASS_TYPE_ALPHA_EXPLAIN' => 'Password must be at least %1$s long, must contain letters in mixed case and must contain numbers.', + 'PASS_TYPE_ANY_EXPLAIN' => 'Must be at least %1$s long.', + 'PASS_TYPE_CASE_EXPLAIN' => 'Password must be at least %1$s long and must contain letters in mixed case.', + 'PASS_TYPE_SYMBOL_EXPLAIN' => 'Password must be at least %1$s long, must contain letters in mixed case, must contain numbers and must contain symbols.', 'PASSWORD' => 'Password', 'PASSWORD_ACTIVATED' => 'Your new password has been activated.', 'PASSWORD_RESET' => 'Your password has been successfully reset.', diff --git a/phpBB/phpbb/cache/driver/apc.php b/phpBB/phpbb/cache/driver/apc.php deleted file mode 100644 index 521d5d41ea..0000000000 --- a/phpBB/phpbb/cache/driver/apc.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/** -* -* This file is part of the phpBB Forum Software package. -* -* @copyright (c) phpBB Limited <https://www.phpbb.com> -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -namespace phpbb\cache\driver; - -/** -* ACM for APC -*/ -class apc extends \phpbb\cache\driver\memory -{ - var $extension = 'apc'; - - /** - * {@inheritDoc} - */ - function purge() - { - apc_clear_cache('user'); - - parent::purge(); - } - - /** - * Fetch an item from the cache - * - * @access protected - * @param string $var Cache key - * @return mixed Cached data - */ - function _read($var) - { - return apc_fetch($this->key_prefix . $var); - } - - /** - * Store data in the cache - * - * @access protected - * @param string $var Cache key - * @param mixed $data Data to store - * @param int $ttl Time-to-live of cached data - * @return bool True if the operation succeeded - */ - function _write($var, $data, $ttl = 2592000) - { - return apc_store($this->key_prefix . $var, $data, $ttl); - } - - /** - * Remove an item from the cache - * - * @access protected - * @param string $var Cache key - * @return bool True if the operation succeeded - */ - function _delete($var) - { - return apc_delete($this->key_prefix . $var); - } -} diff --git a/phpBB/phpbb/console/command/user/add.php b/phpBB/phpbb/console/command/user/add.php index c60a059251..303216a93d 100644 --- a/phpBB/phpbb/console/command/user/add.php +++ b/phpBB/phpbb/console/command/user/add.php @@ -239,7 +239,7 @@ class add extends command array('string', false, $this->config['min_name_chars'], $this->config['max_name_chars']), array('username', '')), 'new_password' => array( - array('string', false, $this->config['min_pass_chars'], $this->config['max_pass_chars']), + array('string', false, $this->config['min_pass_chars'], 0), array('password')), 'email' => array( array('string', false, 6, 60), diff --git a/phpBB/phpbb/db/migration/data/v330/remove_max_pass_chars.php b/phpBB/phpbb/db/migration/data/v330/remove_max_pass_chars.php new file mode 100644 index 0000000000..10e5ee385d --- /dev/null +++ b/phpBB/phpbb/db/migration/data/v330/remove_max_pass_chars.php @@ -0,0 +1,43 @@ +<?php +/** + * + * This file is part of the phpBB Forum Software package. + * + * @copyright (c) phpBB Limited <https://www.phpbb.com> + * @license GNU General Public License, version 2 (GPL-2.0) + * + * For full copyright and license information, please see + * the docs/CREDITS.txt file. + * + */ + +namespace phpbb\db\migration\data\v330; + +class remove_max_pass_chars extends \phpbb\db\migration\migration +{ + public function effectively_installed() + { + return !$this->config->offsetExists('max_pass_chars'); + } + + public static function depends_on() + { + return [ + '\phpbb\db\migration\data\v330\dev', + ]; + } + + public function update_data() + { + return [ + ['config.remove', ['max_pass_chars']], + ]; + } + + public function revert_data() + { + return [ + ['config.add', ['max_pass_chars', 100]], + ]; + } +} diff --git a/phpBB/phpbb/ucp/controller/reset_password.php b/phpBB/phpbb/ucp/controller/reset_password.php index 666957b0dc..7bd1b20cb3 100644 --- a/phpBB/phpbb/ucp/controller/reset_password.php +++ b/phpBB/phpbb/ucp/controller/reset_password.php @@ -393,10 +393,10 @@ class reset_password ]; $check_data = [ 'new_password' => [ - ['string', false, $this->config['min_pass_chars'], $this->config['max_pass_chars']], + ['string', false, $this->config['min_pass_chars'], 0], ['password'], ], - 'password_confirm' => ['string', true, $this->config['min_pass_chars'], $this->config['max_pass_chars']], + 'password_confirm' => ['string', true, $this->config['min_pass_chars'], 0], ]; $errors = array_merge($errors, validate_data($data, $check_data)); if (strcmp($data['new_password'], $data['password_confirm']) !== 0) diff --git a/phpBB/phpbb/user.php b/phpBB/phpbb/user.php index 5a06becb52..21d156e060 100644 --- a/phpBB/phpbb/user.php +++ b/phpBB/phpbb/user.php @@ -281,9 +281,43 @@ class user extends \phpbb\session $db->sql_freeresult($result); } + // Fallback to board's default style if (!$this->style) { - trigger_error('NO_STYLE_DATA', E_USER_ERROR); + // Verify default style exists in the database + $sql = 'SELECT style_id + FROM ' . STYLES_TABLE . ' + WHERE style_id = ' . (int) $config['default_style']; + $result = $db->sql_query($sql); + $style_id = (int) $db->sql_fetchfield('style_id'); + $db->sql_freeresult($result); + + if ($style_id > 0) + { + $db->sql_transaction('begin'); + + // Update $user row + $sql = 'SELECT * + FROM ' . STYLES_TABLE . ' + WHERE style_id = ' . (int) $config['default_style']; + $result = $db->sql_query($sql); + $this->style = $db->sql_fetchrow($result); + $db->sql_freeresult($result); + + // Update user style preference + $sql = 'UPDATE ' . USERS_TABLE . ' + SET user_style = ' . (int) $style_id . ' + WHERE user_id = ' . (int) $this->data['user_id']; + $db->sql_query($sql); + + $db->sql_transaction('commit'); + } + } + + // This should never happen + if (!$this->style) + { + trigger_error($this->language->lang('NO_STYLE_DATA', $this->data['user_style'], $this->data['user_id']), E_USER_ERROR); } // Now parse the cfg file and cache it diff --git a/phpBB/styles/prosilver/template/navbar_header.html b/phpBB/styles/prosilver/template/navbar_header.html index ecb67012a4..4a1a436d4a 100644 --- a/phpBB/styles/prosilver/template/navbar_header.html +++ b/phpBB/styles/prosilver/template/navbar_header.html @@ -183,16 +183,16 @@ <!-- EVENT overall_header_breadcrumbs_before --> <li class="breadcrumbs" itemscope itemtype="http://schema.org/BreadcrumbList"> <!-- IF U_SITE_HOME --> - <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> + <span class="crumb" {$MICRODATA}><a href="{U_SITE_HOME}" itemtype="https://schema.org/Thing" itemscope itemprop="item" data-navbar-reference="home"><i class="icon fa-home fa-fw" aria-hidden="true"></i><span itemprop="name">{L_SITE_HOME}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> <!-- ENDIF --> <!-- EVENT overall_header_breadcrumb_prepend --> - <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> + <span class="crumb" {$MICRODATA}><a href="{U_INDEX}" itemtype="https://schema.org/Thing" itemscope itemprop="item" accesskey="h" data-navbar-reference="index"><!-- IF not U_SITE_HOME --><i class="icon fa-home fa-fw"></i><!-- ENDIF --><span itemprop="name">{L_INDEX}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> <!-- BEGIN navlinks --> {% set NAVLINK_NAME = navlinks.BREADCRUMB_NAME | default(navlinks.FORUM_NAME) %} {% set NAVLINK_LINK = navlinks.U_BREADCRUMB | default(navlinks.U_VIEW_FORUM) %} <!-- EVENT overall_header_navlink_prepend --> - <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{{ NAVLINK_LINK }}" itemtype="https://schema.org/Thing" itemprop="item"><span itemprop="name">{{ NAVLINK_NAME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> + <span class="crumb" {$MICRODATA}<!-- IF navlinks.MICRODATA --> {navlinks.MICRODATA}<!-- ENDIF -->><a href="{{ NAVLINK_LINK }}" itemtype="https://schema.org/Thing" itemscope itemprop="item"><span itemprop="name">{{ NAVLINK_NAME }}</span></a><meta itemprop="position" content="{{ navlink_position }}{% set navlink_position = navlink_position + 1 %}" /></span> <!-- EVENT overall_header_navlink_append --> <!-- END navlinks --> <!-- EVENT overall_header_breadcrumb_append --> diff --git a/phpBB/styles/prosilver/template/overall_footer.html b/phpBB/styles/prosilver/template/overall_footer.html index bdff1a0c05..cd245decc4 100644 --- a/phpBB/styles/prosilver/template/overall_footer.html +++ b/phpBB/styles/prosilver/template/overall_footer.html @@ -17,7 +17,7 @@ </p> <!-- ENDIF --> <!-- EVENT overall_footer_copyright_append --> - <p class="footer-row"> + <p class="footer-row" role="menu"> <a class="footer-link" href="{{ U_PRIVACY }}" title="{{ lang('PRIVACY_LINK') }}" role="menuitem"> <span class="footer-link-text">{{ lang('PRIVACY_LINK') }}</span> </a> diff --git a/tests/RUNNING_TESTS.md b/tests/RUNNING_TESTS.md index 6e9171e7ed..516541151c 100644 --- a/tests/RUNNING_TESTS.md +++ b/tests/RUNNING_TESTS.md @@ -30,7 +30,6 @@ Some of the functionality in phpBB and/or the test suite uses additional PHP extensions. If these extensions are not loaded, respective tests will be skipped: -- apc (APC cache driver, php5 only) - apcu (APCu cache driver - native API, php7+) - apcu_bc, apcu (APCu cache driver - APC API, php7+) - bz2 (compress tests) diff --git a/tests/cache/apc_driver_test.php b/tests/cache/apc_driver_test.php deleted file mode 100644 index 276cbeb3e1..0000000000 --- a/tests/cache/apc_driver_test.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** -* -* This file is part of the phpBB Forum Software package. -* -* @copyright (c) phpBB Limited <https://www.phpbb.com> -* @license GNU General Public License, version 2 (GPL-2.0) -* -* For full copyright and license information, please see -* the docs/CREDITS.txt file. -* -*/ - -// Important: apc.enable_cli=1 must be in php.ini. -// http://forums.devshed.com/php-development-5/apc-problem-561290.html -// http://php.net/manual/en/apc.configuration.php - -require_once dirname(__FILE__) . '/common_test_case.php'; - -class phpbb_cache_apc_driver_test extends phpbb_cache_common_test_case -{ - protected static $config; - - public function getDataSet() - { - return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/config.xml'); - } - - static public function setUpBeforeClass() - { - if (!extension_loaded('apc')) - { - self::markTestSkipped('APC extension is not loaded'); - } - - $php_ini = new \bantu\IniGetWrapper\IniGetWrapper; - - if (!$php_ini->getBool('apc.enabled')) - { - self::markTestSkipped('APC is not enabled. Make sure apc.enabled=1 in php.ini'); - } - - if (PHP_SAPI == 'cli' && !$php_ini->getBool('apc.enable_cli')) - { - self::markTestSkipped('APC is not enabled for CLI. Set apc.enable_cli=1 in php.ini'); - } - } - - protected function setUp(): void - { - parent::setUp(); - - $this->driver = new \phpbb\cache\driver\apc; - $this->driver->purge(); - } -} diff --git a/tests/console/user/base.php b/tests/console/user/base.php index 94a51eb896..b845ab1639 100644 --- a/tests/console/user/base.php +++ b/tests/console/user/base.php @@ -51,7 +51,6 @@ abstract class phpbb_console_user_base extends phpbb_database_test_case 'min_name_chars' => 3, 'max_name_chars' => 10, 'min_pass_chars' => 3, - 'max_pass_chars' => 10, 'pass_complex' => 'PASS_TYPE_ANY', )); |