From b662899ca3f8a6240db6644ca73ec2fb26ac53d2 Mon Sep 17 00:00:00 2001 From: Joe Dolson Date: Sat, 30 Dec 2023 16:24:29 -0600 Subject: [PATCH] Make sure mastodon instance URLs are unslashed --- src/wp-to-twitter-mastodon.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-to-twitter-mastodon.php b/src/wp-to-twitter-mastodon.php index 0ae7672..8e14088 100644 --- a/src/wp-to-twitter-mastodon.php +++ b/src/wp-to-twitter-mastodon.php @@ -25,7 +25,7 @@ function wpt_update_mastodon_settings( $auth = false, $post = false ) { if ( ! empty( $post['wpt_mastodon_token'] ) && ! empty( $post['wpt_mastodon_instance'] ) ) { $ack = sanitize_text_field( trim( $post['wpt_mastodon_token'] ) ); - $acs = sanitize_text_field( trim( $post['wpt_mastodon_instance'] ) ); + $acs = sanitize_text_field( trim( untrailingslashit( $post['wpt_mastodon_instance'] ) ) ); if ( ! $auth ) { // If values are filled with asterisks, do not update; these are masked values.