From 384b956cc11a65be5cf68c9f6ae26a72bc1fbcfd Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Mon, 2 Oct 2006 19:26:12 +0000 Subject: [PATCH] Do only the minimum sanitization on the URL redirect. fixes #2994 git-svn-id: https://develop.svn.wordpress.org/trunk@4268 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/theme-editor.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 3ac368b381..3281ba91cb 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -44,11 +44,15 @@ case 'update': $f = fopen($real_file, 'w+'); fwrite($f, $newcontent); fclose($f); - wp_redirect("theme-editor.php?file=$file&theme=$theme&a=te"); + $location = "theme-editor.php?file=$file&theme=$theme&a=te"; } else { - wp_redirect("theme-editor.php?file=$file&theme=$theme"); + $location = "theme-editor.php?file=$file&theme=$theme"; } + $location = wp_kses_no_null($location); + $strip = array('%0d', '%0a'); + $location = str_replace($strip, '', $location); + header("Location: $location"); exit(); break;