aboutsummaryrefslogtreecommitdiffstats
path: root/lib/rhbzpage.js
diff options
context:
space:
mode:
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));