From a235f770f6ca28f176ac4833a3bdeb81cbec7563 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Fri, 10 Sep 2010 04:09:30 -0700 Subject: [PATCH 01/14] [ticket/9810] Hide "Select All" of code bbcode on print page PHPBB3-9810 --- phpBB/styles/prosilver/theme/print.css | 2 ++ 1 file changed, 2 insertions(+) diff --git a/phpBB/styles/prosilver/theme/print.css b/phpBB/styles/prosilver/theme/print.css index 6dfb5c4726..68600b030b 100644 --- a/phpBB/styles/prosilver/theme/print.css +++ b/phpBB/styles/prosilver/theme/print.css @@ -140,3 +140,5 @@ div.spacer { clear: both; } /* Accessibility tweaks: Mozilla.org */ .skip_link { display: none; } + +dl.codebox dt { display: none; } \ No newline at end of file From 20505ff326e98cdab6c09adc4fa554dae4221aeb Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Sun, 12 Sep 2010 14:21:25 +0200 Subject: [PATCH 02/14] [ticket/9816] Remove config.php from repository PHPBB3-9816 --- .gitignore | 4 +++- phpBB/config.php | 0 2 files changed, 3 insertions(+), 1 deletion(-) delete mode 100644 phpBB/config.php diff --git a/.gitignore b/.gitignore index 3e0f454e0c..3590226920 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ phpBB/cache/*.php -*~ \ No newline at end of file +phpBB/config.php +tests/test_config.php +*~ diff --git a/phpBB/config.php b/phpBB/config.php deleted file mode 100644 index e69de29bb2..0000000000 From 6bfae1cd1a575ed61222a7cf2cb800f4e051a88c Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Thu, 16 Sep 2010 21:57:25 +0200 Subject: [PATCH 03/14] [ticket/9830] Redirect to install directly when config.php does not exist. PHPBB3-9830 --- phpBB/common.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/phpBB/common.php b/phpBB/common.php index 9b6913e95f..c8b2fb9609 100644 --- a/phpBB/common.php +++ b/phpBB/common.php @@ -123,13 +123,11 @@ if (defined('IN_CRON')) $phpbb_root_path = dirname(__FILE__) . DIRECTORY_SEPARATOR; } -if (!file_exists($phpbb_root_path . 'config.' . $phpEx)) +if (file_exists($phpbb_root_path . 'config.' . $phpEx)) { - die("

The config.$phpEx file could not be found.

Click here to install phpBB

"); + require($phpbb_root_path . 'config.' . $phpEx); } -require($phpbb_root_path . 'config.' . $phpEx); - if (!defined('PHPBB_INSTALLED')) { // Redirect the user to the installer From d485664404d44bb371fd9b8a5b23ad8327cea302 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 15 Oct 2010 16:47:21 +0200 Subject: [PATCH 04/14] [ticket/9698] Add .htaccess to the includes subdirectory. Add .htaccess to the includes folder to prevent full path disclosure when running PHP 5.3. When the error_reporting setting in php.ini contains the E_DEPRECATED error level, the PHP parser throws an error message containing the local filesystem path when accessing one of the captcha plugins directly. This is because the captcha plugins return explicit references for PHP 4 compatibility. PHPBB3-9698 --- phpBB/includes/.htaccess | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 phpBB/includes/.htaccess diff --git a/phpBB/includes/.htaccess b/phpBB/includes/.htaccess new file mode 100644 index 0000000000..4128d345ab --- /dev/null +++ b/phpBB/includes/.htaccess @@ -0,0 +1,4 @@ + + Order Allow,Deny + Deny from All + From 59e62d271c3ba97784e2c7e1a9928600e0d2c1f6 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 15 Oct 2010 17:57:43 +0200 Subject: [PATCH 05/14] [ticket/9822] Correct some style related ACP explain statements. Remove "Additionally, if you have permission you can elect to remove the set from the filesystem." because that functionality is not implemented. Also remove unnecessary "When the imageset is deleted it is gone for good." statement, "It is recommended that you first export your set for possible future use." should be clear enough. PHPBB3-9822 --- phpBB/language/en/acp/styles.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpBB/language/en/acp/styles.php b/phpBB/language/en/acp/styles.php index 951c69f915..f161a7e6e6 100644 --- a/phpBB/language/en/acp/styles.php +++ b/phpBB/language/en/acp/styles.php @@ -76,13 +76,13 @@ $lang = array_merge($lang, array( 'DEACTIVATE_DEFAULT' => 'You cannot deactivate the default style.', 'DELETE_FROM_FS' => 'Delete from filesystem', 'DELETE_IMAGESET' => 'Delete imageset', - 'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the imageset is deleted it is gone for good. It is recommended that you first export your set for possible future use.', + 'DELETE_IMAGESET_EXPLAIN' => 'Here you can remove the selected imageset from the database. Please note that there is no undo capability. It is recommended that you first export your set for possible future use.', 'DELETE_STYLE' => 'Delete style', - 'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. You cannot remove all the style elements from here. These must be deleted individually via their respective forms. Take care in deleting styles there is no undo facility.', + 'DELETE_STYLE_EXPLAIN' => 'Here you can remove the selected style. You cannot remove all the style elements from here. These must be deleted individually via their respective forms. Take care when deleting styles, there is no undo facility.', 'DELETE_TEMPLATE' => 'Delete template', - 'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Additionally, if you have permission you can elect to remove the set from the filesystem. Please note that there is no undo capability. When the templates are deleted they are gone for good. It is recommended that you first export your set for possible future use.', + 'DELETE_TEMPLATE_EXPLAIN' => 'Here you can remove the selected template set from the database. Please note that there is no undo capability. It is recommended that you first export your set for possible future use.', 'DELETE_THEME' => 'Delete theme', - 'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Additionally, if you have permission you can elect to remove the theme from the filesystem. Please note that there is no undo capability. When the theme is deleted it is gone for good. It is recommended that you first export your theme for possible future use.', + 'DELETE_THEME_EXPLAIN' => 'Here you can remove the selected theme from the database. Please note that there is no undo capability. It is recommended that you first export your theme for possible future use.', 'DETAILS' => 'Details', 'DIMENSIONS_EXPLAIN' => 'Selecting yes here will include width/height parameters.', From 32ee8955b2e3bb2b1e26c5f12b315c9a6c02cbcf Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 15 Oct 2010 18:08:43 +0200 Subject: [PATCH 06/14] [ticket/9848] Add avatars, attachments and store files to .gitignore. PHPBB3-9848 --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index b825007244..871d17b386 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,8 @@ *~ phpBB/cache/*.php phpBB/config.php +phpBB/files/* +phpBB/images/avatars/upload/* +phpBB/store/* tests/phpbb_unit_tests.sqlite2 tests/test_config.php From 0452da2bf1f93dc8d9ea5c73f1276a5976eaca7d Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 15 Oct 2010 18:54:44 +0200 Subject: [PATCH 07/14] [ticket/7538] Limit user_login_attempts to prevent SQL errors. PHPBB3-7538 --- phpBB/includes/auth/auth_db.php | 6 ++++-- phpBB/includes/constants.php | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/phpBB/includes/auth/auth_db.php b/phpBB/includes/auth/auth_db.php index 73c4f92976..e04a6307e9 100644 --- a/phpBB/includes/auth/auth_db.php +++ b/phpBB/includes/auth/auth_db.php @@ -134,7 +134,8 @@ function login_db(&$username, &$password) // increase login attempt count to make sure this cannot be exploited $sql = 'UPDATE ' . USERS_TABLE . ' SET user_login_attempts = user_login_attempts + 1 - WHERE user_id = ' . $row['user_id']; + WHERE user_id = ' . (int) $row['user_id'] . ' + AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX; $db->sql_query($sql); return array( @@ -194,7 +195,8 @@ function login_db(&$username, &$password) // Password incorrect - increase login attempts $sql = 'UPDATE ' . USERS_TABLE . ' SET user_login_attempts = user_login_attempts + 1 - WHERE user_id = ' . $row['user_id']; + WHERE user_id = ' . (int) $row['user_id'] . ' + AND user_login_attempts < ' . LOGIN_ATTEMPTS_MAX; $db->sql_query($sql); // Give status about wrong password... diff --git a/phpBB/includes/constants.php b/phpBB/includes/constants.php index ff572869e2..ebaa342f54 100644 --- a/phpBB/includes/constants.php +++ b/phpBB/includes/constants.php @@ -69,6 +69,10 @@ define('LOGIN_ERROR_ATTEMPTS', 13); define('LOGIN_ERROR_EXTERNAL_AUTH', 14); define('LOGIN_ERROR_PASSWORD_CONVERT', 15); +// Maximum login attempts +// The value is arbitrary, but it has to fit into the user_login_attempts field. +define('LOGIN_ATTEMPTS_MAX', 100); + // Group settings define('GROUP_OPEN', 0); define('GROUP_CLOSED', 1); From 2c4c1f925768285995020e08b0e5d13c51a5c388 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Sun, 29 Aug 2010 19:46:49 +0200 Subject: [PATCH 08/14] [ticket/9664] Resolve conflict with accesskey="t", change addlitsitem to "y". PHPBB3-9664 --- phpBB/adm/style/acp_users_signature.html | 2 +- phpBB/styles/prosilver/template/posting_buttons.html | 2 +- phpBB/styles/subsilver2/template/posting_buttons.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/phpBB/adm/style/acp_users_signature.html b/phpBB/adm/style/acp_users_signature.html index 6317a375b4..69c6d8f3fb 100644 --- a/phpBB/adm/style/acp_users_signature.html +++ b/phpBB/adm/style/acp_users_signature.html @@ -56,7 +56,7 @@ - + diff --git a/phpBB/styles/prosilver/template/posting_buttons.html b/phpBB/styles/prosilver/template/posting_buttons.html index 4d866681f0..5d21229611 100644 --- a/phpBB/styles/prosilver/template/posting_buttons.html +++ b/phpBB/styles/prosilver/template/posting_buttons.html @@ -79,7 +79,7 @@ - + diff --git a/phpBB/styles/subsilver2/template/posting_buttons.html b/phpBB/styles/subsilver2/template/posting_buttons.html index 2fff9c1991..621fa87fd4 100644 --- a/phpBB/styles/subsilver2/template/posting_buttons.html +++ b/phpBB/styles/subsilver2/template/posting_buttons.html @@ -45,7 +45,7 @@ - + From 931bd25e34a96dbe31089dc76dd2122ef9397279 Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 15 Oct 2010 19:35:40 +0200 Subject: [PATCH 09/14] [ticket/9841] Change "Save" to "Save draft", "Load" to "Load draft". This has confused people that are less familiar with phpBB or web applications in general. "Save draft" should make it clear that a draft is being saved, but it is still short enough to be used in a button. PHPBB3-9841 --- phpBB/styles/prosilver/template/posting_editor.html | 4 ++-- phpBB/styles/subsilver2/template/posting_body.html | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/phpBB/styles/prosilver/template/posting_editor.html b/phpBB/styles/prosilver/template/posting_editor.html index 9476242d11..5f7fb8408e 100644 --- a/phpBB/styles/prosilver/template/posting_editor.html +++ b/phpBB/styles/prosilver/template/posting_editor.html @@ -187,8 +187,8 @@
{S_HIDDEN_ADDRESS_FIELD} {S_HIDDEN_FIELDS} -   -   +   +   onclick="document.getElementById('postform').action += '#preview';" />    diff --git a/phpBB/styles/subsilver2/template/posting_body.html b/phpBB/styles/subsilver2/template/posting_body.html index 963e6fe966..0021cd2eb3 100644 --- a/phpBB/styles/subsilver2/template/posting_body.html +++ b/phpBB/styles/subsilver2/template/posting_body.html @@ -342,8 +342,8 @@   -   -   +   +     @@ -365,8 +365,8 @@   -   -   +   +     From 105de6b637898cbbeae88909baf04706c856e839 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 29 Apr 2010 10:10:35 -0400 Subject: [PATCH 10/14] [ticket/7417] Focus search keywords field when prosilver search page is loaded. PHPBB3-7417 --- phpBB/styles/prosilver/template/search_body.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/search_body.html b/phpBB/styles/prosilver/template/search_body.html index 612641b141..6616b95a73 100644 --- a/phpBB/styles/prosilver/template/search_body.html +++ b/phpBB/styles/prosilver/template/search_body.html @@ -1,5 +1,11 @@ + +

{L_SEARCH}

@@ -119,4 +125,4 @@ - \ No newline at end of file + From 6e9cf09adbc79d8327b1817096c3b16f50fc80d9 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 29 Apr 2010 10:17:16 -0400 Subject: [PATCH 11/14] [ticket/7417] Focus username field when prosilver login page is loaded. PHPBB3-7417 --- phpBB/styles/prosilver/template/login_body.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/phpBB/styles/prosilver/template/login_body.html b/phpBB/styles/prosilver/template/login_body.html index e52ccd6434..26e425a1d0 100644 --- a/phpBB/styles/prosilver/template/login_body.html +++ b/phpBB/styles/prosilver/template/login_body.html @@ -1,5 +1,11 @@ + +
From 940191973fdbffffe51baf1dc5e6abc5bcdf0d75 Mon Sep 17 00:00:00 2001 From: Oleg Pudeyev Date: Thu, 29 Apr 2010 10:38:28 -0400 Subject: [PATCH 12/14] [ticket/7417] Also focus search keywords and username in subsilver2. PHPBB3-7417 --- .../subsilver2/template/login_body.html | 19 ++++++++++++++++++- .../subsilver2/template/search_body.html | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/phpBB/styles/subsilver2/template/login_body.html b/phpBB/styles/subsilver2/template/login_body.html index 503de9e69e..90bbf8c139 100644 --- a/phpBB/styles/subsilver2/template/login_body.html +++ b/phpBB/styles/subsilver2/template/login_body.html @@ -88,4 +88,21 @@
- \ No newline at end of file + + + diff --git a/phpBB/styles/subsilver2/template/search_body.html b/phpBB/styles/subsilver2/template/search_body.html index a0ec30e9ba..763a229c83 100644 --- a/phpBB/styles/subsilver2/template/search_body.html +++ b/phpBB/styles/subsilver2/template/search_body.html @@ -75,4 +75,21 @@
- \ No newline at end of file + + + From 07a8d5a3dd44ea859c721b159a1fe9927dd78a7c Mon Sep 17 00:00:00 2001 From: Igor Wiedler Date: Thu, 14 Oct 2010 19:04:19 +0200 Subject: [PATCH 13/14] [ticket/9162] Prevent notice on unset poll title Regression from a81c857c96ee1a2a9be559ff3c9b71ca9514287e PHPBB3-9162 --- phpBB/posting.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/phpBB/posting.php b/phpBB/posting.php index 853ac18aad..f775699cee 100644 --- a/phpBB/posting.php +++ b/phpBB/posting.php @@ -1300,7 +1300,7 @@ $attachment_data = $message_parser->attachment_data; $filename_data = $message_parser->filename_data; $post_data['post_text'] = $message_parser->message; -if (sizeof($post_data['poll_options']) || $post_data['poll_title']) +if (sizeof($post_data['poll_options']) || !empty($post_data['poll_title'])) { $message_parser->message = $post_data['poll_title']; $message_parser->bbcode_uid = $post_data['bbcode_uid']; From e2d57fb4daa43ddaf4114cec7a3133750e07fea8 Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sun, 17 Oct 2010 12:25:20 +0100 Subject: [PATCH 14/14] [ticket/7332] Fix post details expand link rendering on Webkit. PHPBB3-7332 --- phpBB/styles/prosilver/template/mcp_post.html | 2 +- phpBB/styles/prosilver/theme/content.css | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/phpBB/styles/prosilver/template/mcp_post.html b/phpBB/styles/prosilver/template/mcp_post.html index dab2d572a9..04e24cd1f9 100644 --- a/phpBB/styles/prosilver/template/mcp_post.html +++ b/phpBB/styles/prosilver/template/mcp_post.html @@ -54,7 +54,7 @@ - {L_EXPAND_VIEW} + {L_EXPAND_VIEW}

{POST_SUBJECT}

diff --git a/phpBB/styles/prosilver/theme/content.css b/phpBB/styles/prosilver/theme/content.css index dfe00371e4..64beb97a37 100644 --- a/phpBB/styles/prosilver/theme/content.css +++ b/phpBB/styles/prosilver/theme/content.css @@ -307,6 +307,11 @@ div[class].topic-actions { max-height: 300px; } +#expand +{ + clear: both; +} + /* Content container styles ----------------------------------------*/ .content {