You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are running into issues with PAC Files that uses the shExpMatch Function and uses the Brackets '(' as the first character in the expression.
If we use "shExpMatch(host,"(.example.com|example.com)") the result of a test against "my host.example.com" as the host will return "false" even if all other PAC-File checkers are return true.
The reason is, that the expression resulting from the shExpMatch Function will use the first '(' as a Literal and escape this with (.
The result will then be ^(..example.com|example.com)$
As a quick workaround I tested
// If Expression starts with '(', remove leading and trailing Brackets
if (shExp[0] === "(") {
shExp = shExp.substring(1,shExp.length-1);
}
which seems to work as expected.
The text was updated successfully, but these errors were encountered:
We are running into issues with PAC Files that uses the shExpMatch Function and uses the Brackets '(' as the first character in the expression.
If we use "shExpMatch(host,"(.example.com|example.com)") the result of a test against "my host.example.com" as the host will return "false" even if all other PAC-File checkers are return true.
The reason is, that the expression resulting from the shExpMatch Function will use the first '(' as a Literal and escape this with (.
The result will then be ^(..example.com|example.com)$
As a quick workaround I tested
// If Expression starts with '(', remove leading and trailing Brackets
which seems to work as expected.
The text was updated successfully, but these errors were encountered: