Ticket #247 (closed defect: fixed)

Opened 2 years ago

Last modified 2 years ago

Bug in .htaccess rule for /files/ -> blogs.php

Reported by: orvar Assigned to: somebody
Priority: low Milestone: WPMU 1.0
Component: component1 Version: 1.0
Severity: minor Keywords:
Cc:

Description

The rewrite rule for uploaded files in WordPressMU is like this.

#uploaded files
RewriteRule ^(.*)?/?files/(.*) wp-content/blogs.php?file=$2 [L]

Since the slash before "files" is not mandatory this rule will pass almost all possible urls ending in "files" to blogs.php, e.g. http://example.com/2007/02/01/uploading-files/

Fix:

RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

Change History

02/20/07 13:16:47 changed by donncha

  • status changed from new to closed.
  • resolution set to fixed.

Thanks for the fix. I applied your fix in [891], and in [892] I fixed a problem where a post or page called "files" would trigger blogs.php. I think calling files/trackback/ could cause problems still but it's not a major problem.