mirror of
https://github.com/gorhill/uMatrix.git
synced 2024-06-17 09:44:59 +12:00
fix regression reported at https://www.wilderssecurity.com/threads/umatrix-the-http-switchboard-successor.369601/page-27#post-2737419
This commit is contained in:
parent
429af12aa2
commit
fb4e07f107
|
@ -685,9 +685,8 @@ Matrix.prototype.fromLine = function(line) {
|
||||||
let field0 = fields[0];
|
let field0 = fields[0];
|
||||||
|
|
||||||
// Switches
|
// Switches
|
||||||
let pos = field0.indexOf(':');
|
if ( this.reSwitchRule.test(field0) ) {
|
||||||
if ( pos !== -1 ) {
|
let switchName = field0.slice(0, -1);
|
||||||
let switchName = field0.slice(0, pos);
|
|
||||||
let srcHostname = punycode.toASCII(fields[1]);
|
let srcHostname = punycode.toASCII(fields[1]);
|
||||||
let state = fields[2];
|
let state = fields[2];
|
||||||
if (
|
if (
|
||||||
|
@ -736,6 +735,8 @@ Matrix.prototype.fromLine = function(line) {
|
||||||
return true;
|
return true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Matrix.prototype.reSwitchRule = /^[0-9a-z-]+:$/;
|
||||||
|
|
||||||
/******************************************************************************/
|
/******************************************************************************/
|
||||||
|
|
||||||
Matrix.prototype.toSelfie = function() {
|
Matrix.prototype.toSelfie = function() {
|
||||||
|
|
Loading…
Reference in a new issue