Commit 214128 by goba
#452704 by andypost, catch: Names of compressed CSS and JS files should have a prefix, so that names starting in ad* will not happen. Those are easily blocked by firewalls, Firefox's Adblock, etc.
--- includes/common.inc 2009/05/20 12:03:32 1.756.2.54
+++ includes/common.inc 2009/05/20 12:28:13 1.756.2.55
@@ -1846,7 +1846,9 @@
}
if ($is_writable && $preprocess_css) {
- $filename = md5(serialize($types) . $query_string) .'.css';
+ // Prefix filename to prevent blocking by firewalls which reject files
+ // starting with "ad*".
+ $filename = 'css_'. md5(serialize($types) . $query_string) .'.css';
$preprocess_file = drupal_build_css_cache($types, $filename);
$output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $preprocess_file .'" />'."\n";
}
@@ -2194,7 +2196,9 @@
// Aggregate any remaining JS files that haven't already been output.
if ($is_writable && $preprocess_js && count($files) > 0) {
- $filename = md5(serialize($files) . $query_string) .'.js';
+ // Prefix filename to prevent blocking by firewalls which reject files
+ // starting with "ad*".
+ $filename = 'js_'. md5(serialize($files) . $query_string) .'.js';
$preprocess_file = drupal_build_js_cache($files, $filename);
$preprocessed .= '<script type="text/javascript" src="'. base_path() . $preprocess_file .'"></script>'."\n";
}
+++ includes/common.inc 2009/05/20 12:28:13 1.756.2.55
@@ -1846,7 +1846,9 @@
}
if ($is_writable && $preprocess_css) {
- $filename = md5(serialize($types) . $query_string) .'.css';
+ // Prefix filename to prevent blocking by firewalls which reject files
+ // starting with "ad*".
+ $filename = 'css_'. md5(serialize($types) . $query_string) .'.css';
$preprocess_file = drupal_build_css_cache($types, $filename);
$output .= '<link type="text/css" rel="stylesheet" media="'. $media .'" href="'. base_path() . $preprocess_file .'" />'."\n";
}
@@ -2194,7 +2196,9 @@
// Aggregate any remaining JS files that haven't already been output.
if ($is_writable && $preprocess_js && count($files) > 0) {
- $filename = md5(serialize($files) . $query_string) .'.js';
+ // Prefix filename to prevent blocking by firewalls which reject files
+ // starting with "ad*".
+ $filename = 'js_'. md5(serialize($files) . $query_string) .'.js';
$preprocess_file = drupal_build_js_cache($files, $filename);
$preprocessed .= '<script type="text/javascript" src="'. base_path() . $preprocess_file .'"></script>'."\n";
}