[Pkg-privacy-commits] [xul-ext-monkeysphere] 225/296: add new BROKEN state
Ximin Luo
infinity0 at moszumanska.debian.org
Mon Aug 24 07:39:42 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 a2855bbe21e44a7c79592e96fea59f124f3bb946
Author: Jameson Rollins <jrollins at finestructure.net>
Date: Sat May 1 18:04:58 2010 -0400
add new BROKEN state
This commit fixes issue #2217, where the ext would get caught in a
loop if an https site was sourcing non-https content. This is now
hanled by new BROKEN security state handling, which is similar to
VALID, but provides a broken monkey icon to indicate, with updated
message to indicate state.
---
Makefile | 2 +-
chrome/content/{bad.svg => broken.svg} | 66 +++++++++++++++++++++++++---------
chrome/content/monkeysphere.js | 27 ++++++++++++++
3 files changed, 78 insertions(+), 17 deletions(-)
diff --git a/Makefile b/Makefile
index d52650d..73dd34d 100755
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,7 @@
XPI_CONTENTS:=$(shell find chrome modules defaults -name "*.html" -o -name "*.css" -o -name "*.png" -o -name "*.gif" -o -name "*.js" -o -name "*.jsm" -o -name "*.dtd" -o -name "*.xul" -o -name "messages") chrome.manifest install.rdf COPYING
-ICONS = $(addprefix chrome/content/, bad.png error.png)
+ICONS = $(addprefix chrome/content/, broken.png bad.png error.png)
icons: $(ICONS)
%.png: %.svg
inkscape --export-png $@ --export-area-page --export-background-opacity=0 $<
diff --git a/chrome/content/bad.svg b/chrome/content/broken.svg
similarity index 56%
copy from chrome/content/bad.svg
copy to chrome/content/broken.svg
index f678690..be3da8b 100644
--- a/chrome/content/bad.svg
+++ b/chrome/content/broken.svg
@@ -15,8 +15,7 @@
inkscape:version="0.47 r22583"
width="16"
height="16"
- sodipodi:docname="bad.svg"
- inkscape:export-filename="/home/jrollins/cmrg/monkeysphere/msva/git/xul-ext/chrome/content/error.png"
+ sodipodi:docname="broken.svg"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90">
<metadata
@@ -27,7 +26,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -54,6 +53,20 @@
inkscape:vp_y="0 : 1000 : 0"
inkscape:vp_x="0 : 0.5 : 1"
sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3597"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
+ <inkscape:perspective
+ id="perspective3700"
+ inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+ inkscape:vp_z="1 : 0.5 : 1"
+ inkscape:vp_y="0 : 1000 : 0"
+ inkscape:vp_x="0 : 0.5 : 1"
+ sodipodi:type="inkscape:persp3d" />
</defs>
<sodipodi:namedview
pagecolor="#ffffff"
@@ -68,24 +81,45 @@
inkscape:window-height="734"
id="namedview2896"
showgrid="false"
- inkscape:zoom="23.864854"
- inkscape:cx="6.9422309"
+ inkscape:zoom="22.627417"
+ inkscape:cx="5.5718841"
inkscape:cy="7.7182552"
inkscape:window-x="0"
inkscape:window-y="0"
inkscape:window-maximized="0"
- inkscape:current-layer="svg2894"
+ inkscape:current-layer="g3611"
showborder="true"
- inkscape:showpageshadow="false" />
+ inkscape:showpageshadow="false"
+ borderlayer="false" />
<image
- y="0"
- x="0"
- id="image4287"
- height="16"
+ sodipodi:absref="monkey.png"
+ xlink:href="monkey.png"
width="16"
- xlink:href="monkey.png" />
- <path
- id="path3692"
- style="fill:none;stroke:#ff1900;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
- d="M 3,13 13,3 m 2.034203,5.0000001 c 0,3.8848829 -3.14932,7.0342029 -7.0342029,7.0342029 -3.884883,0 -7.03420276,-3.14932 -7.03420276,-7.0342029 0,-3.8848828 3.14931976,-7.03420248 7.03420276,-7.03420248 3.8848829,0 7.0342029,3.14931968 7.0342029,7.03420248 z" />
+ height="16"
+ id="image4287"
+ x="0"
+ y="0" />
+ <g
+ id="g3611"
+ transform="matrix(1.1079805,0,0,1.1079805,-0.65760376,-1.7120845)">
+ <path
+ sodipodi:nodetypes="csssc"
+ d="m 15.034203,8.765573 c 0,2.357499 -1.911131,4.26863 -4.26863,4.26863 -2.3574987,0 -4.2686292,-1.911131 -4.2686292,-4.26863 0,-2.3574986 1.9111305,-4.268629 4.2686292,-4.268629 2.357499,0 4.26863,1.9111304 4.26863,4.268629 z"
+ style="fill:#ff3520;fill-opacity:1;stroke:#dc0000;stroke-opacity:1;stroke-width:0.27076289;stroke-miterlimit:4;stroke-dasharray:none"
+ id="path3692" />
+ <rect
+ y="5.4019003"
+ x="9.7808619"
+ height="4.1487823"
+ width="1.9694234"
+ id="rect3587"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ <rect
+ y="10.836352"
+ x="9.7808619"
+ height="0.98391497"
+ width="1.9694234"
+ id="rect3587-9"
+ style="fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none" />
+ </g>
</svg>
diff --git a/chrome/content/monkeysphere.js b/chrome/content/monkeysphere.js
index 3667899..757e23d 100644
--- a/chrome/content/monkeysphere.js
+++ b/chrome/content/monkeysphere.js
@@ -63,6 +63,28 @@ var monkeysphere = (function() {
}
return;
+ } else if(state & Components.interfaces.nsIWebProgressListener.STATE_IS_BROKEN) {
+ ms.log(" site state BROKEN");
+
+ // if a monkeysphere-generated cert override is being used by this connection, then we should be setting the status from the override
+ try {
+ var cert = browser.securityUI.SSLStatus.serverCert;
+ } catch(e) {
+ ms.log("no cert found");
+ return;
+ }
+ var apd = ms.createAgentPostData(uri, cert);
+ var response = ms.overrides.response(apd);
+
+ if ( typeof response === 'undefined' ) {
+ ms.setStatus(browser, 'NEUTRAL');
+ } else {
+ // modify the message to indicate that it's only partially validated
+ var newmessage = response.message + ' [Warning: contains non-monkeysphere validated content]';
+ ms.setStatus(browser, 'BROKEN', newmessage);
+ }
+ return;
+
// if site insecure continue
} else if(state & Components.interfaces.nsIWebProgressListener.STATE_IS_INSECURE) {
ms.log(" site state INSECURE");
@@ -166,6 +188,11 @@ var monkeysphere = (function() {
panel.hidden = false;
document.getElementById("monkeysphere-status-clearSite").hidden = false;
break;
+ case 'BROKEN':
+ icon.setAttribute("src", "chrome://monkeysphere/content/broken.png");
+ panel.hidden = false;
+ document.getElementById("monkeysphere-status-clearSite").hidden = false;
+ break;
case 'CLEARED':
icon.setAttribute("src", "chrome://monkeysphere/content/monkey.png");
panel.hidden = false;
--
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