summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-16 18:24:37 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-05-16 18:24:37 +0000
commit6cc59e52609302a9a2d2c53985144627e4443021 (patch)
treedf643521090fa33312c38ba7d04c9188604f46e3
parente8c674647ecd15720b62c86ef8bd11d05df5ce9f (diff)
downloadbrdo-6cc59e52609302a9a2d2c53985144627e4443021.tar.gz
brdo-6cc59e52609302a9a2d2c53985144627e4443021.tar.bz2
#452704 by andypost: Prefix aggregated CSS and JS files to prevent certain firewalls from blocking them if by random coincidence they start with ad*.
-rw-r--r--includes/common.inc8
1 files changed, 6 insertions, 2 deletions
diff --git a/includes/common.inc b/includes/common.inc
index c4b6236a3..c7025fa25 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -2139,7 +2139,9 @@ function drupal_get_css($css = NULL) {
}
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";
}
@@ -2605,7 +2607,9 @@ function drupal_get_js($scope = 'header', $javascript = NULL) {
// 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";
}