Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 3 years ago

#9329 closed defect (bug) (duplicate)

Theme preview not working

Reported by: Denis-de-Bernardy Owned by:
Milestone: Priority: high
Severity: major Version: 2.7.1
Component: General Keywords: commit
Focuses: Cc:


I bumped into this odd bug, in preview_theme()

var_dump($_GET['template']); // foo-bar
	$_GET['template'] = preg_replace('|[^a-z0-9_.-/]|i', '', $_GET['template']);
var_dump($_GET['template']);die; // foobar

Platform is Apache 2.2 with php 5.2.6 on Leopard. I had ran into the issue in plugins in the past, but never in WP. Basically, it treats .-/ like a range, and changing it to ./- fixes the thing.

The fix is trivial, and is attached.

Attachments (1)

9329.diff (1004 bytes) - added by Denis-de-Bernardy 9 years ago.

Download all attachments as: .zip

Change History (4)

#1 @Denis-de-Bernardy
9 years ago

  • Keywords commit added

#2 @filosofo
9 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

duplicate of #9244

#3 @DrewAPicture
3 years ago

  • Milestone 2.7.2 deleted
Note: See TracTickets for help on using tickets.