joomlagerman / joomla

The J!German translation team provides German translation for Joomla!
https://www.jgerman.de
GNU General Public License v2.0
25 stars 46 forks source link

[5.1] brotli compression #3156

Closed jgerman-bot closed 7 months ago

jgerman-bot commented 7 months ago

New language relevant PR in upstream repo: https://github.com/joomla/joomla-cms/pull/43171 Here are the upstream changes:

Click to expand the diff! ```diff diff --git a/administrator/components/com_admin/postinstall/htaccessbrotli.php b/administrator/components/com_admin/postinstall/htaccessbrotli.php index bc6383f63813..7063b0f6906a 100644 --- a/administrator/components/com_admin/postinstall/htaccessbrotli.php +++ b/administrator/components/com_admin/postinstall/htaccessbrotli.php @@ -8,7 +8,7 @@ * @license GNU General Public License version 2 or later; see LICENSE.txt * * This file contains post-installation message handling for notifying users of a change - * in the default .htaccess file regarding setting the Content-Encoding header. + * in the default .htaccess file regarding Brotli compression. */ // phpcs:disable PSR1.Files.SideEffects diff --git a/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-03-28.sql b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-03-28.sql new file mode 100644 index 000000000000..2c3f6ec6e788 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/mysql/5.1.0-2024-03-28.sql @@ -0,0 +1,5 @@ +-- +-- Add post-installation message about Brotli compression in .htaccess +-- +INSERT IGNORE INTO `#__postinstall_messages` (`extension_id`, `title_key`, `description_key`, `action_key`, `language_extension`, `language_client_id`, `type`, `action_file`, `action`, `condition_file`, `condition_method`, `version_introduced`, `enabled`) +SELECT `extension_id`, 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '5.1.0', 1 FROM `#__extensions` WHERE `name` = 'files_joomla'; diff --git a/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-28.sql b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-28.sql new file mode 100644 index 000000000000..6858e2b668b2 --- /dev/null +++ b/administrator/components/com_admin/sql/updates/postgresql/5.1.0-2024-03-28.sql @@ -0,0 +1,6 @@ +-- +-- Add post-installation message about Brotli compression in .htaccess +-- +INSERT INTO "#__postinstall_messages" ("extension_id", "title_key", "description_key", "action_key", "language_extension", "language_client_id", "type", "action_file", "action", "condition_file", "condition_method", "version_introduced", "enabled") +SELECT "extension_id", 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE', 'COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION', '', 'com_admin', 1, 'message', '', '', 'admin://components/com_admin/postinstall/htaccessbrotli.php', 'admin_postinstall_htaccessbrotli_condition', '5.1.0', 1 FROM "#__extensions" WHERE "name" = 'files_joomla' +ON CONFLICT DO NOTHING; diff --git a/administrator/language/en-GB/com_admin.ini b/administrator/language/en-GB/com_admin.ini index 3e1210859e11..05e2fd1af048 100644 --- a/administrator/language/en-GB/com_admin.ini +++ b/administrator/language/en-GB/com_admin.ini @@ -141,10 +141,10 @@ COM_ADMIN_POSTINSTALL_MSG_BEHIND_LOAD_BALANCER_DESCRIPTION="

For Joomla sites COM_ADMIN_POSTINSTALL_MSG_BEHIND_LOAD_BALANCER_TITLE="New Server Setting \"Behind Load Balancer\"" COM_ADMIN_POSTINSTALL_MSG_HTACCESS_AUTOINDEX_DESCRIPTION="

Before 3.9.22 the default htaccess.txt file contained erroneous code meant for disabling directory listings. The security team recommends to manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.

The old code:

<IfModule autoindex>\n  IndexIgnore *\n</IfModule>

The new code:

<IfModule mod_autoindex.c>\n  IndexIgnore *\n</IfModule>
" COM_ADMIN_POSTINSTALL_MSG_HTACCESS_AUTOINDEX_TITLE=".htaccess Update Concerning Directory Listings" +COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION="

Before 5.1.0 the default htaccess.txt did not support Brotli compression. This could result in double compression errors when Joomla is installed on a server that uses Brotli compression. You should manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.

The old code:

RewriteRule \"\.css\.gz$\" \"-\" [T=text/css,E=no-gzip:1]
RewriteRule \"\.js\.gz$\" \"-\" [T=text/javascript,E=no-gzip:1]

The new code:

RewriteRule \"\.css\.gz$\" \"-\" [T=text/css,E=no-gzip:1,E=no-brotli:1]
RewriteRule \"\.js\.gz$\" \"-\" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
" +COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE=".htaccess Update Brotli Compression" COM_ADMIN_POSTINSTALL_MSG_HTACCESS_SETCE_DESCRIPTION="

Before 4.2.9 the default htaccess.txt file contained erroneous code for appending the \"Content-Encoding\" HTTP header. This could result in double encoding errors when Joomla is installed in a subdirectory and both this directory and its parent directory contain an .htaccess file with this code. You should manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.

The old code:

Header append Content-Encoding gzip

The new code:

Header set Content-Encoding gzip
" COM_ADMIN_POSTINSTALL_MSG_HTACCESS_SETCE_TITLE=".htaccess Update Concerning Setting the Content-Encoding Header" -COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_DESCRIPTION="

Before 4.4.4 the default htaccess.txt did not support Brotli compression. This could result in double compression errors when Joomla is installed on a server that uses Brotli compression. You should manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.

The old code:

RewriteRule \"\.css\.gz$\" \"-\" [T=text/css,E=no-gzip:1]
RewriteRule \"\.js\.gz$\" \"-\" [T=text/javascript,E=no-gzip:1]

The new code:

RewriteRule \"\.css\.gz$\" \"-\" [T=text/css,E=no-gzip:1,E=no-brotli:1]
RewriteRule \"\.js\.gz$\" \"-\" [T=text/javascript,E=no-gzip:1,E=no-brotli:1]
" -COM_ADMIN_POSTINSTALL_MSG_HTACCESS_BROTLI_TITLE=".htaccess Update Brotli Compression" COM_ADMIN_SAVE_SUCCESS="Profile saved." COM_ADMIN_SESSION_AUTO_START="Session Auto Start" COM_ADMIN_SESSION_SAVE_PATH="Session Save Path" ```