aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-02-16 16:16:33 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-02-16 16:16:33 +0100
commitd448b16f969be780444190d178dad4c8b2347612 (patch)
tree70518229a92bf0e7b5cdc2497bd59356de1d47a3 /lib
parent10dcf8de5c6965832452c538451d6170b3bafb66 (diff)
downloadbugzilla-triage-d448b16f969be780444190d178dad4c8b2347612.tar.gz
Fix the password recognition.
* doh! !== instead of === * also skip attachment.cgi page
Diffstat (limited to 'lib')
-rw-r--r--lib/libbugzilla.js12
-rw-r--r--lib/main.js3
2 files changed, 4 insertions, 11 deletions
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")