aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-09-04 02:02:36 +0200
committerMatěj Cepl <mcepl@redhat.com>2011-09-04 02:02:36 +0200
commitca155b4e16d15d5ffd62d20ce42a7516c1f9c49c (patch)
tree701eaefa58b58530e24a4c5a66b25290ec1e21f7 /data/lib
parent3c1055ba0f1024133d5ffe5e98d95d00f3b97cbe (diff)
downloadbugzilla-triage-ca155b4e16d15d5ffd62d20ce42a7516c1f9c49c.tar.gz
Fix passwords and XML-RPC logins.
Make switching off XML-RPC per-domain not per-user (fixes #107). Login just once per session and domain (fixes #113).
Diffstat (limited to 'data/lib')
-rw-r--r--data/lib/bzpage.js2
-rw-r--r--data/lib/collectingMetadata.js3
-rw-r--r--data/lib/rpcutils.js22
3 files changed, 3 insertions, 24 deletions
diff --git a/data/lib/bzpage.js b/data/lib/bzpage.js
index 43cf5cb..f3f5e27 100644
--- a/data/lib/bzpage.js
+++ b/data/lib/bzpage.js
@@ -39,7 +39,7 @@ self.on('message', function onMessage(msg) {
equivalentComponents = ("equivalentComponents" in constantData) ?
constantData.equivalentComponents : null;
generateButtons(msg.data.instPkgs, msg.data.kNodes);
- JSONRPCLogin(completeInit);
+ completeInit();
break;
case "Error":
alert("Error " + msg.data);
diff --git a/data/lib/collectingMetadata.js b/data/lib/collectingMetadata.js
index 00b973d..47407e8 100644
--- a/data/lib/collectingMetadata.js
+++ b/data/lib/collectingMetadata.js
@@ -157,7 +157,8 @@ AttachList.prototype.addCheckXorgLogLink = function addCheckXorgLogLink() {
*/
AttachList.prototype.markBadAttachments = function markBadAttachments() {
if (!constantData.passwordState.passAvailable) {
- console.log("markBadAttachments : No password, no XML-RPC calls; sorry");
+ console.log("markBadAttachments : No XML-RPC calls for " +
+ location.protocol + "//" + location.hostname);
return null;
}
diff --git a/data/lib/rpcutils.js b/data/lib/rpcutils.js
index d29fd68..ee8804a 100644
--- a/data/lib/rpcutils.js
+++ b/data/lib/rpcutils.js
@@ -2,28 +2,6 @@
//http://www.opensource.org/licenses/mit-license.php
"use strict";
-/*
-We should first login and then we shouldn't bother with it.
-It could be interesting to know how many logins per second are bad.
- */
-
-function JSONRPCLogin(callback) {
- if (!constantData.passwordState.password) {
- return;
- }
-
- console.myDebug("JSONRPCLogin: passObj = " +
- constantData.passwordState.toSource());
- makeJSONRPCCall("User.login", {
- login: getLogin(),
- password: constantData.passwordState.password,
- remember: false
- }, function(logResult) {
- callback();
- });
-};
-
-
// Make a JSONL-RPC call ... most of the business logic should stay in the
// content script
// http://json-rpc.org/wd/JSON-RPC-1-1-WD-20060807.html