-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release notes: * The extension's ID [1] has been changed. The old ID was `[email protected]`, the new one is `[email protected]`. Some details: * The main reason is that the old ID has been disabled by Mozilla for Firefox 38+ because of a bug [2] and because the "old" add-on was unmaintained. * What does this mean? - With the new ID it's again possible to use RequestPolicy 0.5.* on Firefox 38 or later. - In addition to that, the changed ID allowed us to upload the add-on to Mozilla's Add-Ons website (aka AMO). You can find it at [3]. However, if you're reading this, the add-on might still be "unreviewed" [4] and therefore not to be found via search. * A warning is shown if the extension with the old extension ID is installed and enabled. It's not possible to have both add-ons enabled in the same browser at the same time. [1] Info about extension IDs https://developer.mozilla.org/en-US/Add-ons/Install_Manifests#id [2] Mozilla Bug regarding RequestPolicy https://bugzilla.mozilla.org/show_bug.cgi?id=1077185 [3] RequestPolicy Continued on Mozilla's Add-Ons website https://addons.mozilla.org/en-US/firefox/addon/requestpolicy-continued/ [4] Info about "unreviewed" add-ons https://addons.mozilla.org/en-US/faq#unreviewed
- Loading branch information
Showing
11 changed files
with
137 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
RequestPolicy | ||
RequestPolicy Continued | ||
================================================= | ||
|
||
A Firefox extension for allowing user control over cross-site requests. | ||
|
||
Author: Justin Samuel <justin (at) justinsamuel (dot) com> | ||
original author: Justin Samuel | ||
maintainer/main developer: Martin Kimmerle | ||
License: GPL 3 or later | ||
Copyright 2008 | ||
Website: http://www.requestpolicy.com/ | ||
|
||
Documentation | ||
------------- | ||
|
||
On the website: http://www.requestpolicy.com/ | ||
Website and Documentation | ||
------------------------- | ||
https://requestpolicycontinued.github.io/ | ||
|
||
|
||
Installation | ||
------------ | ||
|
||
Any way you like to install your Firefox extensions. For example, you can open | ||
the .xpi file through Firefox's File > Open dialog. | ||
|
||
|
||
The extension is developed on github | ||
------------------------------------ | ||
https://github.com/RequestPolicyContinued/requestpolicy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
<property name="src.dir" value="." /> | ||
<property name="dist.dir" value="dist" /> | ||
<property name="app.name" value="requestpolicy" /> | ||
<property name="app.id" value="requestpolicy@requestpolicy.com" /> | ||
<property name="app.id" value="rpcontinued@requestpolicy.org" /> | ||
<!-- extension id like: [email protected] --> | ||
<property name="ff.dir" value="" /> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,6 +179,40 @@ RequestPolicyService.prototype = { | |
// default preferences. | ||
}, | ||
|
||
|
||
_checkForLegacyRP : function () { | ||
|
||
function addonCallback(addon) { | ||
if (addon === null) { | ||
// RP is not installed | ||
return; | ||
} | ||
|
||
if (addon.isActive === false) { | ||
// RP is disabled | ||
return; | ||
} | ||
|
||
const url = "chrome://rpcontinued/content/rp-and-rpc.html"; | ||
|
||
var wm = CC["@mozilla.org/appshell/window-mediator;1"] | ||
.getService(CI.nsIWindowMediator); | ||
var mostRecentWindow = wm.getMostRecentWindow("navigator:browser"); | ||
|
||
// the gBrowser object of the firefox window | ||
var _gBrowser = mostRecentWindow.getBrowser(); | ||
|
||
if (typeof(_gBrowser.addTab) !== "function") { | ||
return; | ||
} | ||
|
||
_gBrowser.selectedTab = _gBrowser.addTab(url); | ||
} | ||
|
||
AddonManager.getAddonByID("[email protected]", | ||
addonCallback); | ||
}, | ||
|
||
_initializeExtensionCompatibility : function() { | ||
if (this._compatibilityRules.length != 0) { | ||
return; | ||
|
@@ -516,6 +550,7 @@ RequestPolicyService.prototype = { | |
os.addObserver(this, "http-on-modify-request", false); | ||
os.addObserver(this, "xpcom-shutdown", false); | ||
os.addObserver(this, "profile-after-change", false); | ||
os.addObserver(this, "sessionstore-windows-restored", false); | ||
os.addObserver(this, "quit-application", false); | ||
os.addObserver(this, "private-browsing", false); | ||
os.addObserver(this, HTTPS_EVERYWHERE_REWRITE_TOPIC, false); | ||
|
@@ -537,6 +572,7 @@ RequestPolicyService.prototype = { | |
os.removeObserver(this, "http-on-modify-request"); | ||
os.removeObserver(this, "xpcom-shutdown"); | ||
os.removeObserver(this, "profile-after-change"); | ||
os.removeObserver(this, "sessionstore-windows-restored"); | ||
os.removeObserver(this, "quit-application"); | ||
if (!AddonManager) { | ||
os.removeObserver(this, "em-action-requested"); | ||
|
@@ -1669,6 +1705,9 @@ RequestPolicyService.prototype = { | |
this._initializeExtensionCompatibility(); | ||
this._initializeApplicationCompatibility(); | ||
|
||
break; | ||
case "sessionstore-windows-restored": | ||
this._checkForLegacyRP(); | ||
break; | ||
case "private-browsing" : | ||
if (data == "enter") { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> | ||
<head> | ||
<title>RequestPolicy Continued - Notice about legacy RP</title> | ||
<style> | ||
body { | ||
background: #fec; | ||
font-family: sans-serif; | ||
} | ||
|
||
#content { | ||
background-image: url(chrome://rpcontinued/skin/requestpolicy-icon-32.png); | ||
background-position: 16px 3.3em; | ||
background-repeat: no-repeat; | ||
max-width: 45em; | ||
padding: 3em 3em 3em 72px; | ||
} | ||
|
||
h1 { | ||
margin-top: 0; | ||
} | ||
|
||
h1 span { | ||
color: #c32; | ||
font-size: 0.7em; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="content"> | ||
<h1>Important Notice! <span>regarding RequestPolicy</span></h1> | ||
|
||
<p> | ||
You've successfully installed <i>RequestPolicy Continued</i>! | ||
</p> | ||
|
||
<p> | ||
However, currently both <i>“RequestPolicy”</i> and | ||
<i>“RequestPolicy Continued”</i> are installed and enabled | ||
in your browser. <b>This will lead to conflicts!</b> | ||
</p> | ||
|
||
<p> | ||
Therefore, please disable or uninstall the old version. To do | ||
that, visit the <a href ="about:addons">Add-ons Manager</a>. | ||
</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,16 +4,21 @@ | |
xmlns:em="http://www.mozilla.org/2004/em-rdf#"> | ||
|
||
<Description about="urn:mozilla:install-manifest"> | ||
<em:name>RequestPolicy</em:name> | ||
<em:version>0.5.28</em:version> | ||
<em:name>RequestPolicy Continued</em:name> | ||
<em:version>0.5.29</em:version> | ||
<em:type>2</em:type> | ||
<em:description>Control which cross-site requests are allowed. Improve the privacy of your browsing. Secure yourself from Cross-Site Request Forgery (CSRF) and other attacks.</em:description> | ||
<em:creator>Justin Samuel</em:creator> | ||
<em:id>[email protected]</em:id> | ||
<em:homepageURL>http://www.requestpolicy.com/</em:homepageURL> | ||
<em:id>[email protected]</em:id> | ||
<em:unpack>true</em:unpack> | ||
<em:homepageURL>https://requestpolicycontinued.github.io/</em:homepageURL> | ||
<em:optionsURL>chrome://requestpolicy/content/prefWindow.xul</em:optionsURL> | ||
<em:iconURL>chrome://requestpolicy/skin/requestpolicy-icon-32.png</em:iconURL> | ||
|
||
<em:creator>RequestPolicy Continued Team</em:creator> | ||
|
||
<em:developer>Justin Samuel (original author)</em:developer> | ||
<em:developer>Martin Kimmerle (main developer)</em:developer> | ||
|
||
<em:contributor>myahoo (French translation)</em:contributor> | ||
<em:contributor>Team erweiterungen.de (German translation)</em:contributor> | ||
<em:contributor>Archaeopteryx (German translation)</em:contributor> | ||
|
@@ -40,7 +45,7 @@ | |
<Description> | ||
<em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> | ||
<em:minVersion>4.0</em:minVersion> | ||
<em:maxVersion>26.0</em:maxVersion> | ||
<em:maxVersion>40.0a2</em:maxVersion> | ||
</Description> | ||
</em:targetApplication> | ||
|
||
|
@@ -49,7 +54,7 @@ | |
<Description> | ||
<em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> | ||
<em:minVersion>2.1</em:minVersion> | ||
<em:maxVersion>2.23</em:maxVersion> | ||
<em:maxVersion>2.33.*</em:maxVersion> | ||
</Description> | ||
</em:targetApplication> | ||
|
||
|