aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhbzpage.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-07-16 04:25:30 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-07-16 04:25:30 +0200
commit3f70ba468a91e0f5abe20034dd50e3c63a6fcb1a (patch)
tree88fe917ec4e22b26134546249a9f51cbe1b85071 /lib/rhbzpage.js
parent91aac059810fec3d849bb48eb51f55e64b1cc32b (diff)
downloadbugzilla-triage-3f70ba468a91e0f5abe20034dd50e3c63a6fcb1a.tar.gz
Use Firefox nsILoginManager to store password and make it optional.0.13
Fixes #16.
Diffstat (limited to 'lib/rhbzpage.js')
-rw-r--r--lib/rhbzpage.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/rhbzpage.js b/lib/rhbzpage.js
index 82d5e05..bc3394c 100644
--- a/lib/rhbzpage.js
+++ b/lib/rhbzpage.js
@@ -61,7 +61,7 @@ var RHBugzillaPage = function RHBugzillaPage(win, config) {
this.chipMagicInterestingLine = "";
this.login = this.getLogin();
- this.password = this.getPassword();
+ this.password = this.getPassword(this.login);
var ITbutton = this.doc.getElementById("cf_issuetracker");
this.its = ITbutton ? ITbutton.value.trim() : "";
@@ -288,6 +288,10 @@ RHBugzillaPage.prototype.pasteBacktraceInComments = function() {
*/
RHBugzillaPage.prototype.markBadAttachments = function() {
var badMIMEArray = [ "application/octet-stream", "text/x-log", "undefined" ];
+ if (!this.password) {
+ return ; // User didn't provide password, so whole MIME fixing business
+ // should be switched off.
+ }
var badAttachments = this.attachments.filter(function(att, idx, arr) {
return (util.isInList(att[2], badMIMEArray));