Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repair some meta and relax detection a bit. #1634

Merged
merged 1 commit into from
Jul 2, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Repair some meta and relax detection a bit.
* Chromium 75.0.3770.90 started spewing this out and it's not in *mime-db* dep (yet?)... Relates to `/install/<username>/<scriptname>.meta.js`. Don't think it has an extension spec based off skimming doc
* Relaxing is temporary atm in lieu of more aggressive re

Post #1633 #1632 #944 and applies to #1548 #432
Martii committed Jul 2, 2019
commit d1542bba0ee34e7f3545d1c93abef942a197ca4b
11 changes: 10 additions & 1 deletion controllers/scriptStorage.js
Original file line number Diff line number Diff line change
@@ -92,6 +92,15 @@ if (!mediaDB['image/jxr']) {
});
}

// Allow some Chromium based browsers to test
if (!mediaDB['application/signed-exchange']) {
mediaDB = _.extend(mediaDB, {
'application/signed-exchange' : {
source: 'google',
extensions: []
}
});
}

if (!mediaDB['*/*']) {
mediaDB = _.extend(mediaDB, {'*/*' : { source: 'iana'}});
@@ -550,7 +559,7 @@ exports.sendScript = function (aReq, aRes, aNext) {
let matches = null;
let rAnyLocalMetaUrl = new RegExp(
'^' + patternHasSameOrigin +
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.meta\.js$'
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.(?:meta|user)\.js$'
);
let hasAlternateLocalUpdateURL = false;

2 changes: 1 addition & 1 deletion libs/modelParser.js
Original file line number Diff line number Diff line change
@@ -233,7 +233,7 @@ var parseScript = function (aScript) {
);
var rAnyLocalMetaUrl = new RegExp(
'^' + patternHasSameOrigin +
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.meta\.js$'
'/(?:meta|install|src/scripts)/(.+?)/(.+?)\.(?:meta|user)\.js$'
);

var rSameOrigin = new RegExp(