Skip to content
This repository has been archived by the owner on Jul 4, 2019. It is now read-only.

Commit

Permalink
Addon: escape correctly signatures for URL generation
Browse files Browse the repository at this point in the history
  • Loading branch information
calixteman committed Apr 3, 2018
1 parent 9a73a3e commit 4858c27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions webextension/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ if (container) {
} else if (cb) {
s = s.slice(-1).trim();
}
signatures.push("s=" + s);
signatures.push("s=" + escape(s));
}
});
if (signatures.length != 0) {
Expand All @@ -38,7 +38,7 @@ if (container) {
const params = new URLSearchParams(a.href.slice(baseUrl.length));
for (let p of params) {
if (!sayNo.has(p[0])) {
extraSocorroArgs.push(p[0] + "=" + p[1]);
extraSocorroArgs.push(p[0] + "=" + escape(p[1]));
}
}
}
Expand Down Expand Up @@ -111,7 +111,7 @@ if (container) {
if (rev.length > 12) {
rev = rev.slice(0, 12);
}
hgrevs.push("h=" + repo + "|" + rev);
hgrevs.push("h=" + repo + "%7C" /* | */ + rev);
}
}
}
Expand All @@ -123,7 +123,7 @@ if (container) {
const hpart = hgrevs.length != 0 ? (hgrevs.join("&") + "&") : "";
const spart = signatures.join("&") + "&";
const extra = extraSocorroArgs.join("&");
const crashStopLink = encodeURI(sumup + "?" + hpart + spart + extra);
const crashStopLink = sumup + "?" + hpart + spart + extra;
const LSName = "Crash-Stop-V1";
const iframe = document.createElement("iframe");
let bugid;
Expand Down
2 changes: 1 addition & 1 deletion webextension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Bugzilla Crash Stop",
"description": "This webextension inserts table with data under crash signatures to check if the patches had an effect on crash numbers.",
"version": "0.2.3",
"version": "0.2.4",
"manifest_version": 2,
"applications": {
"gecko": {
Expand Down

0 comments on commit 4858c27

Please sign in to comment.