Skip to content

Commit

Permalink
#15: Updating bmz_cache/.htaccess for Apache 2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
lat9 committed Jul 2, 2023
1 parent 68c63c6 commit 3df85c5
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 15 deletions.
4 changes: 2 additions & 2 deletions YOUR_ADMIN/includes/init_includes/init_image_handler.php
Expand Up @@ -7,13 +7,13 @@
die('Illegal Access');
}

define('IH_CURRENT_VERSION', '5.3.3');
define('IH_CURRENT_VERSION', '5.3.4');

// -----
// Wait until an admin is logged in before seeing if any initialization steps need to be performed.
// That ensures that "someone" will see the plugin's installation/update messages!
//
if (isset($_SESSION['admin_id'])) {
if (isset($_SESSION['admin_id']) && (!defined('IH_RESIZE') || !defined('IH_VERSION') || IH_VERSION !== IH_CURRENT_VERSION)) {
// -----
// Determine the configuration group associated with "Images"; if not found, use the standard
// configuration group ID of 4.
Expand Down
29 changes: 18 additions & 11 deletions bmz_cache/.htaccess
@@ -1,7 +1,7 @@
#
# @copyright Copyright 2003-2013 Zen Cart Development Team
# @copyright Copyright 2003-2022 Zen Cart Development Team
# @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
# @version GIT: $Id: Author: DrByte Fri May 17 14:29:18 2013 -0400 Modified in v1.5.2 $
# @version $Id: torvista 2022 Aug 03 Modified in v1.5.8-alpha2 $
#
# This is used with Apache WebServers
#
Expand All @@ -19,24 +19,31 @@

# deny *everything*
<FilesMatch ".*">
Order Allow,Deny
Deny from all
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Deny from all
</IfModule>
</FilesMatch>

# but now allow just *certain* necessary files:
<FilesMatch "(?i).*\.(jpe?g|gif|webp|png|swf)$" >
Order Allow,Deny
Allow from all
<FilesMatch "(?i).*\.(jpe?g|gif|webp|png)$">
<IfModule mod_authz_core.c>
Require all granted
</IfModule>
<IfModule !mod_authz_core.c>
Order Allow,Deny
Allow from all
</IfModule>
</FilesMatch>

IndexIgnore */*


## NOTE: If you want even greater security to prevent hackers from running scripts in this folder, uncomment the following line (if your hosting company will allow you to use OPTIONS):
# OPTIONS -Indexes -ExecCGI



##################
## Optional caching improvements
## Requires mod_headers to be enabled within Apache
Expand All @@ -45,7 +52,7 @@ IndexIgnore */*
Header unset Pragma
FileETag None
Header unset ETag
<FilesMatch "(?i).*\.(jpe?g|gif|webp|png|swf)$">
<FilesMatch "(?i).*\.(jpe?g|gif|webp|png)$">
Header set Cache-control "max-age=864000, public, must-revalidate"
Header unset Last-Modified
</FilesMatch>
Expand Down
11 changes: 9 additions & 2 deletions docs/image_handler/readme.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand Down Expand Up @@ -65,7 +65,7 @@

<body>
<h1>Image Handler<sup>5</sup> for Zen Cart v1.5.7 (and later)</h1>
<h3>Version 5.3.3 by lat9, Zen4All, brittainmark, torvista, proseLA and marco-pm</h3>
<h3>Version 5.3.4 by lat9, Zen4All, brittainmark, torvista, proseLA, marco-pm and pilou2</h3>
<p>Current Support Thread at Zen Cart Forums: <a href="https://www.zen-cart.com/showthread.php?222983-Image-Handler-5-(for-v1-5-5)-Support-Thread" target="_blank">https://www.zen-cart.com/showthread.php?222983-Image-Handler-5-(for-v1-5-5)-Support-Thread</a></p>

<p><strong>Notes:</strong></p>
Expand Down Expand Up @@ -425,6 +425,13 @@ <h2>Un-Install Instructions</h2>

<div id="changes">
<ul>
<li>v5.3.4, 2023-07-02:<ul>
<li>BUGFIX: Correct <var>/bmz_cache/.htaccess</var> for Apache 2.4 installations (pilou2).</li>
<li>The following files were changed:<ol>
<li>/bmz_cache/.htaccess</li>
<li>/YOUR_ADMIN/includes/init_includes/init_image_handler.php</li>
</ol></li>
</ul></li>
<li>v5.3.3, 2023-04-26:<ul>
<li>BUGFIX: Correct MySQL error on initial install due to unescaped single-quotes.</li>
<li>BUGFIX: Correct &quot;Implicit conversion&quot; PHP Warning.</li>
Expand Down

0 comments on commit 3df85c5

Please sign in to comment.