Closed james-valente-simplisafe closed 1 year ago
I suspect the issue may be in these lines of code.
My interpretation of the code: If the cookie name was not found, then push the new element. However, in this case, new_element
will be abc=undefined
.
The check for the value
being undefined
only occurs in the else
section, which itself depends on the cookie name already existing.
To resolve, there must also be a check at line 124 to ensure that value
is not undefined
.
if (selected_cookie_index == -1) {
if (value != undefined) { // not sure if this should be != or !==
cookies_ar.push(new_element);
}
} else {
thanks for the issue and the solution , it will be solve in next release
Browser
Firefox 110
Bug
When the cookie name in a "Cookie Delete" rule does not already exist in the request, the extension will append the cookie with a value of
undefined
.Precondition
For this bug to occur, you must navigate to a web site that already has a cookie associated with it.
To Reproduce
To reproduce on any web site, use the following rules. The first two will remove the entire Cookie header, then add a simple Cookie header. The third rule will attempt to delete the
abc
cookie which does not exist.Result as it appears in Firefox browser