Google XML Sitemaps - Version 4.1.1

Version Description

(2020-08-11) = * Fixed security issue related to trailing slashes

Download this release

Release Info

Developer fredericktownes
Plugin Icon 128x128 Google XML Sitemaps
Version 4.1.1
Comparing to
See all releases

Code changes from version 4.1.0 to 4.1.1

Files changed (5) hide show
  1. readme.txt +14 -11
  2. sitemap-core.php +2 -2
  3. sitemap-loader.php +3 -0
  4. sitemap-ui.php +9 -9
  5. sitemap.php +7 -9
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
- === Google XML Sitemaps ===
2
- Contributors: arnee
3
  Tags: seo, google, bing, yahoo, msn, ask, live, sitemaps, google sitemaps, xml sitemap, xml
4
  Requires at least: 3.3
5
- Tested up to: 5.0.1
6
- Stable tag: 4.1.0
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
@@ -21,9 +21,9 @@ Supported since *over 9 years* and rated as the [best WordPress plugin](http://w
21
 
22
  Related Links:
23
 
24
- * <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/" title="Google XML Sitemaps Plugin for WordPress">Plugin Homepage</a>
25
- * <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/changelog/" title="Changelog of the Google XML Sitemaps Plugin for WordPress">Changelog</a>
26
- * <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/help/" title="Google Sitemaps FAQ">Plugin help and sitemaps FAQ</a>
27
  * <a href="http://wordpress.org/support/topic/read-before-opening-a-new-support-topic">Support Forum</a>
28
 
29
  == Installation ==
@@ -57,11 +57,11 @@ No, only if you want to. Default values are ok for most sites.
57
 
58
  = Does this plugin work with all WordPress versions? =
59
 
60
- This version works with WordPress 3.3 and better. If you're using an older version, please check the [Google Sitemaps Plugin Homepage](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/ "Google (XML) Sitemap Generator Plugin Homepage") for the legacy releases. There is a working release for every WordPress version since 1.5, but you really should consider updating your WordPress installation!
61
 
62
  = My question isn't answered here =
63
 
64
- Most of the plugin options are described at the [plugin homepage](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/) as well as the dedicated [Google Sitemaps FAQ](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/help/ "List of common questions / problems regarding Google (XML) Sitemaps").
65
 
66
  = My question isn't even answered there =
67
 
@@ -69,7 +69,7 @@ Please post your question at the [WordPress support forum](http://wordpress.org/
69
 
70
  = What's new in the latest version? =
71
 
72
- The changelog is maintained [here](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/changelog/ "Google (XML) Sitemap Generator Plugin Changelog")
73
 
74
  = Why is the changelog on a separate page and not here? =
75
 
@@ -77,6 +77,9 @@ The WordPress.org repository is just another place to download this plugin. I do
77
 
78
  == Changelog ==
79
 
 
 
 
80
  = 4.1.0 (2018-12-18) =
81
  * Fixed security issue related to escaping external URLs
82
  * Fixed security issue related to option tags in forms
@@ -461,4 +464,4 @@ The plugin comes with various translations, please refer to the [WordPress Codex
461
  == Upgrade Notice ==
462
 
463
  = 4.0.9 =
464
- Thanks for using Google XML Sitemaps! This release includes an important security fix that has been reported.
1
+ === XML Sitemaps ===
2
+ Contributors: auctollo
3
  Tags: seo, google, bing, yahoo, msn, ask, live, sitemaps, google sitemaps, xml sitemap, xml
4
  Requires at least: 3.3
5
+ Tested up to: 5.7
6
+ Stable tag: 4.1.1
7
  License: GPLv2
8
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
 
21
 
22
  Related Links:
23
 
24
+ * <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/" title="XML Sitemaps Plugin for WordPress">Plugin Homepage</a>
25
+ * <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/changelog/" title="Changelog of the XML Sitemaps Plugin for WordPress">Changelog</a>
26
+ * <a href="http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/help/" title="Sitemaps FAQ">Plugin help and sitemaps FAQ</a>
27
  * <a href="http://wordpress.org/support/topic/read-before-opening-a-new-support-topic">Support Forum</a>
28
 
29
  == Installation ==
57
 
58
  = Does this plugin work with all WordPress versions? =
59
 
60
+ This version works with WordPress 3.3 and better. If you're using an older version, please check the [Sitemaps Plugin Homepage](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/ "XML Sitemap Generator Plugin Homepage") for the legacy releases. There is a working release for every WordPress version since 1.5, but you really should consider updating your WordPress installation!
61
 
62
  = My question isn't answered here =
63
 
64
+ Most of the plugin options are described at the [plugin homepage](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/) as well as the dedicated [Sitemaps FAQ](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/help/ "List of common questions / problems regarding XML Sitemaps").
65
 
66
  = My question isn't even answered there =
67
 
69
 
70
  = What's new in the latest version? =
71
 
72
+ The changelog is maintained [here](http://www.arnebrachhold.de/projects/wordpress-plugins/google-xml-sitemaps-generator/changelog/ "XML Sitemap Generator Plugin Changelog")
73
 
74
  = Why is the changelog on a separate page and not here? =
75
 
77
 
78
  == Changelog ==
79
 
80
+ = 4.1.1 (2020-08-11) =
81
+ * Fixed security issue related to trailing slashes
82
+
83
  = 4.1.0 (2018-12-18) =
84
  * Fixed security issue related to escaping external URLs
85
  * Fixed security issue related to option tags in forms
464
  == Upgrade Notice ==
465
 
466
  = 4.0.9 =
467
+ Thanks for using XML Sitemaps! This release includes an important security fix that has been reported.
sitemap-core.php CHANGED
@@ -2260,8 +2260,8 @@ final class GoogleSitemapGenerator {
2260
  <div class="updated">
2261
  <strong>
2262
  <p>
2263
- <?php echo str_replace('%s', 'https://w3edge.wufoo.com/forms/mex338s1ysw3i0/',
2264
- __('Thank you for using Google XML Sitemaps! <a href="%s" target="_blank">Please help us improve by taking this short survey!</a>','sitemap'));
2265
  ?> <a href="<?php echo $this->GetBackLink() . "&amp;sm_hide_survey=true"; ?>" style="float:right; display:block; border:none;"><small style="font-weight:normal; "><?php _e('Don\'t show this anymore', 'sitemap'); ?></small></a>
2266
  </p>
2267
  </strong>
2260
  <div class="updated">
2261
  <strong>
2262
  <p>
2263
+ <?php echo str_replace('%s', 'https://forms.gle/aFkbBs2rfGqQoCqj8',
2264
+ __('Google XML Sitemaps 5.0 is around the corner! <a href="%s" target="_blank"> Help us shape the future of sitemaps by taking this short survey</a>','sitemap'));
2265
  ?> <a href="<?php echo $this->GetBackLink() . "&amp;sm_hide_survey=true"; ?>" style="float:right; display:block; border:none;"><small style="font-weight:normal; "><?php _e('Don\'t show this anymore', 'sitemap'); ?></small></a>
2266
  </p>
2267
  </strong>
sitemap-loader.php CHANGED
@@ -68,6 +68,9 @@ class GoogleSitemapGeneratorLoader {
68
  if (!wp_get_schedule('sm_ping_daily')) {
69
  wp_schedule_event(time() + (60 * 60), 'daily', 'sm_ping_daily');
70
  }
 
 
 
71
  }
72
 
73
  /**
68
  if (!wp_get_schedule('sm_ping_daily')) {
69
  wp_schedule_event(time() + (60 * 60), 'daily', 'sm_ping_daily');
70
  }
71
+
72
+ //Disable the WP core XML sitemaps.
73
+ add_filter( 'wp_sitemaps_enabled', '__return_false' );
74
  }
75
 
76
  /**
sitemap-ui.php CHANGED
@@ -145,11 +145,11 @@ class GoogleSitemapGeneratorUI {
145
 
146
  return $pages;
147
  }
148
-
149
- static public function escape($v) {
150
- // prevent html tags in strings where they are not required
151
- return strtr($v, '<>', '..');
152
- }
153
 
154
  /**
155
  * Displays the option page
@@ -305,10 +305,10 @@ class GoogleSitemapGeneratorUI {
305
  $_POST[$k]=stripslashes(self::escape($_POST[$k]));
306
  } else if($k=="sm_b_baseurl") {
307
  $_POST[$k] = esc_url_raw(trim(self::escape($_POST[$k])));
308
- if(!empty($_POST[$k])) $_POST[$k] = trailingslashit($_POST[$k]);
309
- } else if($k=="sm_b_style") {
310
- $_POST[$k] = esc_url_raw(trim(self::escape($_POST[$k])));
311
- if(!empty($_POST[$k])) $_POST[$k] = trailingslashit($_POST[$k]);
312
  }
313
  $this->sg->SetOption($k,(string) $_POST[$k]);
314
  } else if($k == "sm_b_time") {
145
 
146
  return $pages;
147
  }
148
+
149
+ static public function escape($v) {
150
+ // prevent html tags in strings where they are not required
151
+ return strtr($v, '<>', '..');
152
+ }
153
 
154
  /**
155
  * Displays the option page
305
  $_POST[$k]=stripslashes(self::escape($_POST[$k]));
306
  } else if($k=="sm_b_baseurl") {
307
  $_POST[$k] = esc_url_raw(trim(self::escape($_POST[$k])));
308
+ if(!empty($_POST[$k])) $_POST[$k] = untrailingslashit($_POST[$k]);
309
+ } else if($k=="sm_b_style") {
310
+ $_POST[$k] = esc_url_raw(trim(self::escape($_POST[$k])));
311
+ if(!empty($_POST[$k])) $_POST[$k] = untrailingslashit($_POST[$k]);
312
  }
313
  $this->sg->SetOption($k,(string) $_POST[$k]);
314
  } else if($k == "sm_b_time") {
sitemap.php CHANGED
@@ -3,29 +3,27 @@
3
  /*
4
  $Id: sitemap.php 1026247 2014-11-15 16:47:36Z arnee $
5
 
6
- Google XML Sitemaps Generator for WordPress
7
  ==============================================================================
8
 
9
  This generator will create a sitemaps.org compliant sitemap of your WordPress site.
10
 
11
  For additional details like installation instructions, please check the readme.txt and documentation.txt files.
12
 
13
- Have fun!
14
- Arne
15
 
16
  Info for WordPress:
17
  ==============================================================================
18
- Plugin Name: Google XML Sitemaps
19
  Plugin URI: http://www.arnebrachhold.de/redir/sitemap-home/
20
  Description: This plugin improves SEO using sitemaps for best indexation by search engines like Google, Bing, Yahoo and others.
21
- Version: 4.1.0
22
- Author: Arne Brachhold
23
  Author URI: http://www.arnebrachhold.de/
24
  Text Domain: sitemap
25
  Domain Path: /lang
26
 
27
 
28
- Copyright 2005 - 2018 ARNE BRACHHOLD (email : himself - arnebrachhold - de)
29
 
30
  This program is free software; you can redistribute it and/or modify
31
  it under the terms of the GNU General Public License as published by
@@ -82,7 +80,7 @@ function sm_Setup() {
82
  * @since 4.0
83
  */
84
  function sm_AddWpVersionError() {
85
- echo "<div id='sm-version-error' class='error fade'><p><strong>" . __('Your WordPress version is too old for XML Sitemaps.', 'sitemap') . "</strong><br /> " . sprintf(__('Unfortunately this release of Google XML Sitemaps requires at least WordPress %4$s. You are using Wordpress %2$s, which is out-dated and insecure. Please upgrade or go to <a href="%1$s">active plugins</a> and deactivate the Google XML Sitemaps plugin to hide this message. You can download an older version of this plugin from the <a href="%3$s">plugin website</a>.', 'sitemap'), "plugins.php?plugin_status=active", $GLOBALS["wp_version"], "http://www.arnebrachhold.de/redir/sitemap-home/","3.3") . "</p></div>";
86
  }
87
 
88
  /**
@@ -92,7 +90,7 @@ function sm_AddWpVersionError() {
92
  * @since 4.0
93
  */
94
  function sm_AddPhpVersionError() {
95
- echo "<div id='sm-version-error' class='error fade'><p><strong>" . __('Your PHP version is too old for XML Sitemaps.', 'sitemap') . "</strong><br /> " . sprintf(__('Unfortunately this release of Google XML Sitemaps requires at least PHP %4$s. You are using PHP %2$s, which is out-dated and insecure. Please ask your web host to update your PHP installation or go to <a href="%1$s">active plugins</a> and deactivate the Google XML Sitemaps plugin to hide this message. You can download an older version of this plugin from the <a href="%3$s">plugin website</a>.', 'sitemap'), "plugins.php?plugin_status=active", PHP_VERSION, "http://www.arnebrachhold.de/redir/sitemap-home/","5.2") . "</p></div>";
96
  }
97
 
98
  /**
3
  /*
4
  $Id: sitemap.php 1026247 2014-11-15 16:47:36Z arnee $
5
 
6
+ XML Sitemaps Generator for WordPress
7
  ==============================================================================
8
 
9
  This generator will create a sitemaps.org compliant sitemap of your WordPress site.
10
 
11
  For additional details like installation instructions, please check the readme.txt and documentation.txt files.
12
 
 
 
13
 
14
  Info for WordPress:
15
  ==============================================================================
16
+ Plugin Name: XML Sitemaps
17
  Plugin URI: http://www.arnebrachhold.de/redir/sitemap-home/
18
  Description: This plugin improves SEO using sitemaps for best indexation by search engines like Google, Bing, Yahoo and others.
19
+ Version: 4.1.1
20
+ Author: Auctollo
21
  Author URI: http://www.arnebrachhold.de/
22
  Text Domain: sitemap
23
  Domain Path: /lang
24
 
25
 
26
+ Copyright 2005 - 2018 AUCTOLLO
27
 
28
  This program is free software; you can redistribute it and/or modify
29
  it under the terms of the GNU General Public License as published by
80
  * @since 4.0
81
  */
82
  function sm_AddWpVersionError() {
83
+ echo "<div id='sm-version-error' class='error fade'><p><strong>" . __('Your WordPress version is too old for XML Sitemaps.', 'sitemap') . "</strong><br /> " . sprintf(__('Unfortunately this release of Google XML Sitemaps requires at least WordPress %4$s. You are using Wordpress %2$s, which is out-dated and insecure. Please upgrade or go to <a href="%1$s">active plugins</a> and deactivate the XML Sitemaps plugin to hide this message. You can download an older version of this plugin from the <a href="%3$s">plugin website</a>.', 'sitemap'), "plugins.php?plugin_status=active", $GLOBALS["wp_version"], "http://www.arnebrachhold.de/redir/sitemap-home/","3.3") . "</p></div>";
84
  }
85
 
86
  /**
90
  * @since 4.0
91
  */
92
  function sm_AddPhpVersionError() {
93
+ echo "<div id='sm-version-error' class='error fade'><p><strong>" . __('Your PHP version is too old for XML Sitemaps.', 'sitemap') . "</strong><br /> " . sprintf(__('Unfortunately this release of XML Sitemaps requires at least PHP %4$s. You are using PHP %2$s, which is out-dated and insecure. Please ask your web host to update your PHP installation or go to <a href="%1$s">active plugins</a> and deactivate the Google XML Sitemaps plugin to hide this message. You can download an older version of this plugin from the <a href="%3$s">plugin website</a>.', 'sitemap'), "plugins.php?plugin_status=active", PHP_VERSION, "http://www.arnebrachhold.de/redir/sitemap-home/","5.2") . "</p></div>";
94
  }
95
 
96
  /**