• Hi Guys,

    I’ve been using KB Advanced RSS Widget for quite a while now and it did have a problem a few weeks back that I managed to fix by doing the following changes:
    https://www.ads-software.com/support/topic/undefined-variable-if-debugging-is-enabled-fixable-with-1-line-of-code?replies=1

    However, I just updated my website to have site-wide SSL and unfortunately the plugin is loading the /wp-includes/rss.png file via non-HTTPS connections which obviously isn’t very safe and opens the site up to cross site injections.

    Mixed Content: The page at 'https://www.website.com/' was loaded over HTTPS, but requested an insecure image 'https://www.website.com/wp-includes/images/rss.png'. This content should also be served over HTTPS.

    I found the following bits of code but I am unsure how to update them correctly, I have already updated the admin > general > site address links to both be https.

    if ( empty($items) || $items < 1 ){
    			$items = 10;
    		}
    		if ( '' == $output_format ){
    			$output_format = "<li><a class='kbrsswidget' href='^link\$' title='^description\$'>^title\$</a></li>";
    		}
    		if ( '' == $url ){
    			$output_begin = "<ul>";	// note that we're checking whether the url is empty. that way we don't re-populate these fields if somebody
    			$output_end = "</ul>";	// intentionally cleared them. we only want to populate them when beginning a new widget.
    			if ( file_exists(dirname(__FILE__) . '/rss.png') ){
    				$icon = str_replace(ABSPATH, get_settings('siteurl').'/', dirname(__FILE__)) . '/rss.png';
    			}else{
    				$icon = get_settings('siteurl').'/wp-includes/images/rss.png';
    			}
    			$url = "https://";
    		}
    // REQUIRED. Displays widget's admin form.
    	function form($instance) { /// UPDATED
    
    		if ( empty($instance) ){ // set defaults
    			$output_format = "<li><a class='kbrsswidget' href='^link\$' title='^description\$'>^title\$</a></li>";
    			$output_begin = "<ul>";
    			$output_end = "</ul>";
    			if ( file_exists(dirname(__FILE__) . '/rss.png') ){
    				$icon = str_replace(ABSPATH, get_settings('siteurl').'/', dirname(__FILE__)) . '/rss.png';
    			}else{
    				$icon = includes_url('images/rss.png');
    			}
    			$instance = array( 'title' => '', 'url' => '', 'items' => 10, 'error' => false, 'icon'=>$icon, 'linktitle'=>0, 'display_empty'=>0, 'reverse_order'=>0, 'utf'=>0, 'output_format'=>$output_format, 'output_begin'=>$output_begin, 'output_end'=>$output_end );
    		}
    
    		$instance['number'] = $this->number;
    
    		$this->build_form( $instance );
    	}

    I’d greatly appreciate some help converting them to both be compatible with https.

    I’m using https://www.ads-software.com/plugins/wp-force-ssl/ for forcing SSL across the website, everything else is working fine…

    Thanks

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘KB Advanced RSS Widget (Outdated, Simple Update help needed)’ is closed to new replies.