diff --git a/js/popup.js b/js/popup.js index a2a11cd..6fee2d0 100644 --- a/js/popup.js +++ b/js/popup.js @@ -790,6 +790,22 @@ function formCookieData(form) { $(".expiration", form).removeClass("error"); } } + + /* + * New Chrome restrictions do not allow SameSite=None without Secure being + * marked as true. + */ + if (sameSite === 'no_restriction' && !secure) { + $(".sameSite", form).addClass("error"); + $(".sameSite", form).focus(); + $(".error-message").html("'No Restriction' requires that Secure be checked."); + $(".error-message").show(); + return undefined; + } else { + $(".sameSite", form).removeClass("error"); + $(".error-message").hide(); + } + newCookie.secure = secure; newCookie.httpOnly = httpOnly; newCookie.sameSite = sameSite; diff --git a/popup.html b/popup.html index 41060a0..060c8f3 100644 --- a/popup.html +++ b/popup.html @@ -227,7 +227,7 @@ @@ -249,6 +249,7 @@ +