Heine

  • drupal
  • drupal core commits
  • about
Home

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";
   }

No votes yet
  • Drupal Core
  • Download patch

Recent posts

  • Drupal 6: $base_path doesn't always point to the frontpage
  • XNA SoundEffect ContentLoadException
  • A new form element in Drupal core
  • The backstabbing March-Hare
  • Drupal HEAD and HTTP 500 errors on IIS 7

All-time popular content

  • Update UID 1 password via JS
  • Keeping an eye on Drupal core
  • Subversion on Strato V-PowerServer
  • A new form element in Drupal core
  • Access denied - Are you sure?
more

Tags

Captcha Coding Drupal FAPI IIS Let's hope it doesn't become popular Performance PHP Planet Drupal Quiz Security V-PowerServer
more tags
  • drupal
  • drupal core commits
  • about

Copyright © 2009 by Heine Deelstra. All rights reserved.