From c5e495b588047c73ad06fa9330c10825fed43d06 Mon Sep 17 00:00:00 2001 From: John Berninger Date: Dec 03 2006 18:27:22 +0000 Subject: Fix for BZ 213985 --- diff --git a/wordpress-bz213985.patch b/wordpress-bz213985.patch new file mode 100644 index 0000000..58d8f5c --- /dev/null +++ b/wordpress-bz213985.patch @@ -0,0 +1,49 @@ +diff -ruN wp-204/wp-content/plugins/wp-db-backup.php wp-205/wp-content/plugins/wp-db-backup.php +--- wp-204/wp-content/plugins/wp-db-backup.php 2006-07-26 18:56:56.000000000 -0400 ++++ wp-205/wp-content/plugins/wp-db-backup.php 2006-09-25 14:51:54.000000000 -0400 +@@ -4,7 +4,7 @@ + Plugin URI: http://www.skippy.net/blog/plugins/ + Description: On-demand backup of your WordPress database. + Author: Scott Merrill +-Version: 1.7 ++Version: 1.8 + Author URI: http://www.skippy.net/ + + Much of this was modified from Mark Ghosh's One Click Backup, which +@@ -69,7 +69,8 @@ + $via = isset($_GET['via']) ? $_GET['via'] : 'http'; + + $this->backup_file = $_GET['backup']; +- ++ $this->validate_file($this->backup_file); ++ + switch($via) { + case 'smtp': + case 'email': +@@ -95,6 +96,7 @@ + } + if (isset($_GET['fragment'] )) { + list($table, $segment, $filename) = explode(':', $_GET['fragment']); ++ $this->validate_file($filename); + $this->backup_fragment($table, $segment, $filename); + } + +@@ -881,6 +883,18 @@ + + return; + } // wp_cron_db_backup ++ ++ function validate_file($file) { ++ if (false !== strpos($file, '..')) ++ die(__("Cheatin' uh ?")); ++ ++ if (false !== strpos($file, './')) ++ die(__("Cheatin' uh ?")); ++ ++ if (':' == substr($file, 1, 1)) ++ die(__("Cheatin' uh ?")); ++ } ++ + } + + function wpdbBackup_init() { diff --git a/wordpress.spec b/wordpress.spec index ae58258..40dd9f3 100644 --- a/wordpress.spec +++ b/wordpress.spec @@ -3,7 +3,7 @@ URL: http://www.wordpress.org Name: wordpress Version: 2.0.4 Group: Applications/Publishing -Release: 2%{?dist} +Release: 3%{?dist} License: GPL # Source0 with name-version does not work for web retrieval, # latest.tar.gz does not work for build @@ -74,6 +74,9 @@ rm -rf ${RPM_BUILD_ROOT} %dir %{_sysconfdir}/wordpress %changelog +* Sun Dec 3 2006 John Berninger - 2.0.4-3 +- Remove mysql-server dependency + * Sun Dec 3 2006 John Berninger - 2.0.4-2 - Fix wp-db-backup.php vuln in BZ 213985