Skip to content

Commit b0a05e7

Browse files
release: fixes
- Enhanced security
2 parents a607280 + 55a5663 commit b0a05e7

File tree

4 files changed

+17
-1
lines changed

4 files changed

+17
-1
lines changed

css/settings.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
display: none;
119119
}
120120

121-
:is(.feedzy-banner, .feedzy-banner-dashboard):not(.themeisle-sale) {
121+
:is(.feedzy-banner, .feedzy-banner-dashboard):not(#tsdk_banner) {
122122
visibility: hidden;
123123
}
124124

@@ -136,6 +136,10 @@
136136
margin: 0;
137137
}
138138

139+
.feedzy-container > #tsdk_banner {
140+
padding: 0;
141+
}
142+
139143
.feedzy-container{
140144
max-width: 1224px;
141145
margin: 0 auto;

includes/abstract/feedzy-rss-feeds-admin-abstract.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ public function feedzy_rss( $atts, $content = '' ) {
454454
} else {
455455
$attributes .= 'data-has_valid_cache="true"';
456456
}
457+
458+
// Add nonce based on feed url.
459+
$attributes .= 'data-nonce="' . esc_attr( wp_create_nonce( $feed_url ) ) . '"';
460+
457461
$class = array_filter( apply_filters( 'feedzy_add_classes_block', array( $sc['classname'], 'feedzy-' . md5( is_array( $feed_url ) ? implode( ',', $feed_url ) : $feed_url ) ), $sc, null, $feed_url ) );
458462
$html = "<div class='feedzy-lazy' $attributes>";
459463
$html .= "$content</div>";
@@ -552,6 +556,11 @@ public function feedzy_lazy_load( $data ) {
552556
$atts = $data['args'];
553557
$sc = $this->get_short_code_attributes( $atts );
554558
$feed_url = $this->normalize_urls( $sc['feeds'] );
559+
$nonce = isset( $atts['nonce'] ) ? $atts['nonce'] : '';
560+
561+
if ( ! wp_verify_nonce( $nonce, $feed_url ) ) {
562+
wp_send_json_error( array( 'message' => __( 'Security check failed.', 'feedzy-rss-feeds' ) ) );
563+
}
555564

556565
if ( isset( $sc['filters'] ) && ! empty( $sc['filters'] ) && feedzy_is_pro() ) {
557566
$sc['filters'] = apply_filters( 'feedzy_filter_conditions_attribute', $sc['filters'] );

includes/layouts/feedzy-support.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
?>
1919
<div class="feedzy-container">
20+
<div id="tsdk_banner" class="feedzy-banner"></div>
2021
<div class="feedzy-accordion-item mb-30">
2122
<div class="feedzy-accordion-item__content">
2223
<div class="fz-tabs-menu">

js/feedzy-lazy.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
success: function(data){
4141
if(data.success){
4242
$feedzy_block.empty().append(data.data.content);
43+
} else {
44+
$feedzy_block.empty().append(data.data.message);
4345
}
4446
},
4547
complete: function(){

0 commit comments

Comments
 (0)