Skip to content

Commit

Permalink
release v0.5.29
Browse files Browse the repository at this point in the history
Release notes:

* The extension's ID [1] has been changed.
  The old ID was `requestpolicy@requestpolicy.com`,
  the new one is `rpcontinued@requestpolicy.org`.
  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
myrdd committed May 27, 2015
2 parents c61724f + 1383e91 commit 87af215
Show file tree
Hide file tree
Showing 11 changed files with 137 additions and 22 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,10 @@
*.xpi
*.bak*
*.orig

# build and dist directories in the root folder
/build/
/dist/

/tests/mozmill/data
/tests/mozmill/mozmill-tests
18 changes: 11 additions & 7 deletions src/README
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
2 changes: 1 addition & 1 deletion src/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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: xxx@xxx.com -->
<property name="ff.dir" value="" />

Expand Down
3 changes: 3 additions & 0 deletions src/chrome.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ content requestpolicy content/
resource requestpolicy modules/
skin requestpolicy classic/1.0 skin/

content rpcontinued content/
skin rpcontinued classic/1.0 skin/

locale requestpolicy en-US locale/en-US/
locale requestpolicy de locale/de/
locale requestpolicy eo locale/eo/
Expand Down
3 changes: 3 additions & 0 deletions src/chrome.manifest.devel
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ content requestpolicy content/
resource requestpolicy modules/
skin requestpolicy classic/1.0 skin/

content rpcontinued content/
skin rpcontinued classic/1.0 skin/

locale requestpolicy en-US locale/en-US/
locale requestpolicy de locale/de/
locale requestpolicy eo locale/eo/
Expand Down
3 changes: 3 additions & 0 deletions src/chrome.manifest.packaging
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ content requestpolicy jar:chrome/requestpolicy.jar!/content/
resource requestpolicy modules/
skin requestpolicy classic/1.0 jar:chrome/requestpolicy.jar!/skin/

content rpcontinued jar:chrome/requestpolicy.jar!/content/
skin rpcontinued classic/1.0 jar:chrome/requestpolicy.jar!/skin/

locale requestpolicy en-US jar:chrome/requestpolicy.jar!/locale/en-US/
locale requestpolicy de jar:chrome/requestpolicy.jar!/locale/de/
locale requestpolicy eo jar:chrome/requestpolicy.jar!/locale/eo/
Expand Down
39 changes: 39 additions & 0 deletions src/components/requestpolicyService.js
Original file line number Diff line number Diff line change
Expand Up @@ -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("requestpolicy@requestpolicy.com",
addonCallback);
},

_initializeExtensionCompatibility : function() {
if (this._compatibilityRules.length != 0) {
return;
Expand Down Expand Up @@ -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);
Expand All @@ -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");
Expand Down Expand Up @@ -1669,6 +1705,9 @@ RequestPolicyService.prototype = {
this._initializeExtensionCompatibility();
this._initializeApplicationCompatibility();

break;
case "sessionstore-windows-restored":
this._checkForLegacyRP();
break;
case "private-browsing" :
if (data == "enter") {
Expand Down
4 changes: 2 additions & 2 deletions src/content/overlay.xul
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<toolbarbutton id="requestpolicyToolbarButton"
class="toolbarbutton-1 chromeclass-toolbar-additional"
label="RequestPolicy"
tooltiptext="RequestPolicy"
tooltiptext="RequestPolicy Continued"
type="menu-button"
oncontextmenu="event.preventDefault();"
onclick="requestpolicy.overlay.openToolbarPopup(this)" />
Expand All @@ -55,7 +55,7 @@
<statusbarpanel
class="statusbarpanel-menu-iconic"
id="requestpolicyStatusbar"
tooltiptext="RequestPolicy"
tooltiptext="RequestPolicy Continued"
oncontextmenu="event.preventDefault();"
onclick="requestpolicy.overlay.openStatusbarPopup(this);"
>
Expand Down
10 changes: 5 additions & 5 deletions src/content/prefWindow.xul
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
<textbox id="addOrigin-originField" emptytext="&rp.origin;"
oninput="requestpolicy.prefWindow.addToWhitelistInputChanged(this)"
flex="1"
onkeydown="if(event.keyCode==event.DOM_VK_ENTER || event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
onkeydown="if(event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
<button id="addOrigin" label="&rp.allow;"
oncommand="requestpolicy.prefWindow.addToWhitelist(this)"
disabled="true" />
Expand Down Expand Up @@ -160,7 +160,7 @@
<textbox id="addDestination-destinationField" emptytext="&rp.destination;"
oninput="requestpolicy.prefWindow.addToWhitelistInputChanged(this)"
flex="1"
onkeydown="if(event.keyCode==event.DOM_VK_ENTER || event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
onkeydown="if(event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
<button id="addDestination" label="&rp.allow;"
oncommand="requestpolicy.prefWindow.addToWhitelist(this)"
disabled="true" />
Expand Down Expand Up @@ -188,19 +188,19 @@
<button id="removeOriginsToDestinations" label="&preferences.removeSelectedSites;"
oncommand="requestpolicy.prefWindow.removeSelectedFromList(this.listbox)"
disabled="true" />
</hbox>
</hbox>
<separator class="thin" />
<hbox>
<textbox id="addOriginToDestination-originField"
emptytext="&rp.origin;"
oninput="requestpolicy.prefWindow.addToWhitelistInputChanged(this)"
flex="1"
onkeydown="if(event.keyCode==event.DOM_VK_ENTER || event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
onkeydown="if(event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
<textbox id="addOriginToDestination-destinationField"
emptytext="&rp.destination;"
oninput="requestpolicy.prefWindow.addToWhitelistInputChanged(this)"
flex="1"
onkeydown="if(event.keyCode==event.DOM_VK_ENTER || event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
onkeydown="if(event.keyCode==event.DOM_VK_RETURN) { requestpolicy.prefWindow.addToWhitelist(this.button); return false; }" />
<button id="addOriginToDestination" label="&rp.allow;"
oncommand="requestpolicy.prefWindow.addToWhitelist(this)"
disabled="true" />
Expand Down
51 changes: 51 additions & 0 deletions src/content/rp-and-rpc.html
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>&ldquo;RequestPolicy&rdquo;</i> and
<i>&ldquo;RequestPolicy Continued&rdquo;</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>
19 changes: 12 additions & 7 deletions src/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -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>requestpolicy@requestpolicy.com</em:id>
<em:homepageURL>http://www.requestpolicy.com/</em:homepageURL>
<em:id>rpcontinued@requestpolicy.org</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>
Expand All @@ -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>

Expand All @@ -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>

Expand Down

0 comments on commit 87af215

Please sign in to comment.