From d448b16f969be780444190d178dad4c8b2347612 Mon Sep 17 00:00:00 2001 From: Matěj Cepl Date: Wed, 16 Feb 2011 16:16:33 +0100 Subject: Fix the password recognition. * doh! !== instead of === * also skip attachment.cgi page --- lib/libbugzilla.js | 12 ++---------- lib/main.js | 3 ++- 2 files changed, 4 insertions(+), 11 deletions(-) (limited to 'lib') diff --git a/lib/libbugzilla.js b/lib/libbugzilla.js index 41aa27a..2ec69a6 100644 --- a/lib/libbugzilla.js +++ b/lib/libbugzilla.js @@ -136,9 +136,6 @@ exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, c location = new urlMod.URL(location); } - console.log("location = " + location); - console.log("typeof location = " + typeof location); - // Collect enabled packages per hostname (plus default ones) if (config.gJSONData && ("commentPackages" in config.gJSONData)) { if ("enabledPackages" in config.gJSONData.configData) { @@ -185,19 +182,14 @@ exports.getInstalledPackages = function getInstalledPackages(locationLoginObj, c config.gJSONData.commentStrings["sentUpstreamString"]; } - // Investigate situation about password - /* - passwObj = { - password: null, // password string or null if no password provided - withoutPass: false // whether user doesn't want to use password at all - }; */ var locURL = new urlMod.URL(locationLoginObj.location); var passDomain = locURL.scheme + "://" + locURL.host; var passwObj = getPassword(locationLoginObj.login, passDomain); // In order to avoid sending whole password to the content script, // we are sending just these two Booleans. + console.log("getInstalledPackages : passwObj = " + passwObj.toSource()); config.constantData.passwordState = { - passAvailable: (passwObj.password === null), + passAvailable: (passwObj.password !== null), withoutPass: passwObj.withoutPass }; diff --git a/lib/main.js b/lib/main.js index 0348842..cd8f259 100644 --- a/lib/main.js +++ b/lib/main.js @@ -139,7 +139,8 @@ libbz.initialize(libbz.config, function () { pageMod.PageMod({ include: [ - "https://bugzilla.redhat.com/process_bug.cgi" + "https://bugzilla.redhat.com/process_bug.cgi", + "https://bugzilla.redhat.com/attachment.cgi" ], contentScriptWhen: 'ready', contentScriptFile: self.data.url("skip-bug.js") -- cgit