[Pkg-privacy-commits] [xul-ext-monkeysphere] 24/296: support 'new API' by parsing JSON response from security agent
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:39:21 UTC 2015
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch debian
in repository xul-ext-monkeysphere.
commit 56bd2fd1cf3ef82be6962595246517cf189e72f5
Author: mike castleman <m at mlcastle.net>
Date: Sat Jan 9 17:23:38 2010 -0500
support 'new API' by parsing JSON response from security agent
---
chrome/content/monkeysphere.js | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/chrome/content/monkeysphere.js b/chrome/content/monkeysphere.js
index 95e012b..718ca7d 100644
--- a/chrome/content/monkeysphere.js
+++ b/chrome/content/monkeysphere.js
@@ -339,7 +339,18 @@ var monkeysphere = {
if (client.readyState == 4) {
if (client.status == 200) {
- monkeysphere.securityOverride(browser, cert);
+ var response = JSON.parse(client.responseText);
+ if (response.valid) {
+ monkeysphere.log("query", "computer says yes");
+ monkeysphere.securityOverride(browser, cert);
+ } else {
+ monkeysphere.log("query", "computer says no");
+ }
+ if (response.message) {
+ monkeysphere.log("query", "computer also says:" + response.message);
+ }
+ } else {
+ alert("Your security agent didn't work right.");
}
}
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/xul-ext-monkeysphere.git
More information about the Pkg-privacy-commits
mailing list