gboudreau / sabconnectplusplus

SABnzbd extension for Google Chrome
GNU General Public License v3.0
77 stars 44 forks source link

Chrome 59+, Open SABnzbd link #157

Closed tehmark closed 7 years ago

tehmark commented 7 years ago

When clicking "Open SABnzbd" from the extension menu, you arrive at an unstyled page with missing content. This seems to be an issue with a deprecated way of passing credentials. I was able to work around this in a local copy by modifying line 31 of the popup.js. I removed the if statement for the authentication and the page loads correctly now. Here is the section of code that I've modified.

    $('#open_sabnzbd').click( function() {
        var profile = activeProfile();
        var url = $.url.parse( profile.url );

        var build = {
            protocol: url.protocol,
            host: url.host,
            port: url.port,
            path: url.path,
        }                   
        chrome.tabs.create( { url: $.url.build( build ) } );
    });

Since SAB has a remember me option at the login page this doesn't seem to be causing any problems for me.

Code removed is


        if( store.get( 'config_enable_automatic_authentication' ) ) {
            build.user = $.url.encode(profile.username);
            build.password = $.url.encode(profile.password);
        }