Skip to content

Commit fbd00ea

Browse files
committed
Escaping / Update Process
1 parent f5dd42f commit fbd00ea

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ This project is licensed under the GPL3 License.
279279
* Feature: Toot Content Filter
280280
* Feature: Date Filter
281281
* Feature: Image Filter
282+
* Security: Better Output Escaping
282283

283284
### 0.4 "Cassie Lang"
284285

tootpress.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/*
44
Plugin Name: TootPress
55
Description: TootPress copies your Toots from Mastodon to WordPress.
6-
Version: 0.4
6+
Version: 0.5
77
Author: Marco Hitschler
88
Author URI: https://www.unmus.de/
99
License: GPL3

tootpress_blog.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ function tootpress_paint_toot( $mastodon_id, $date, $content, $media , $instance
3131
$toot_html='';
3232

3333
// Toot ID as HTML Comment
34-
$toot_html.='<!-- Toot ID '.$mastodon_id.'-->';
34+
$toot_html.='<!-- Toot ID '.esc_html($mastodon_id).'-->';
3535

3636
// Toot Start
3737
$toot_html.='<div class="tootpress-toot"/>';
3838

3939
// Toot Elephant
40-
$toot_html.=tootpress_paint_elephant( $instance, $account, $mastodon_id,$backlink);
40+
$toot_html.=tootpress_paint_elephant( $instance, $account, $mastodon_id, $backlink);
4141

4242
// Toot Date
4343
$toot_html.=tootpress_paint_date($date);

tootpress_healthy.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ function tootpress_healthy_check() {
127127
// Required to build the backlinks
128128
$mastodon_account_name=tootpress_get_mastodon_account_name();
129129
if ($mastodon_account_name) {
130-
$output.='Mastodon Account Name has been retrieved: @'.$mastodon_account_name;
130+
$output.='Mastodon Account Name has been retrieved: @'.esc_html($mastodon_account_name);
131131
} else {
132132
$output.='<span class="tootpress-healtycheck-warning">&nbsp;Warning:&nbsp;</span> Mastodon Account Name could not be retrieved.';
133133
}

tootpress_update.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ function tootpress_update() {
4242
}
4343
add_option('tootpress_rewrite_update','0');
4444
}
45+
46+
/* Update Process Version 0.4 */
47+
if($tootpress_previous_version==4) {
48+
update_option('tootpress_plugin_version', "5");
49+
}
50+
51+
/* Update Process Version 0.5 */
52+
if($tootpress_previous_version==5) {
53+
update_option('tootpress_plugin_version', "6");
54+
}
4555

4656
}
4757
add_action( 'plugins_loaded', 'tootpress_update' );

0 commit comments

Comments
 (0)