Skip to content
Open
Show file tree
Hide file tree
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
16 changes: 16 additions & 0 deletions js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@
<label class="formLabel" i18n="sameSite"></label>
<select class="sameSite input" type="text">
<option selected="selected" i18n="SameSite_None" value="no_restriction"></option>
<option i18n="SameSite_Lax" value="lax"></option>
<option i18n="SameSite_Lax" value="lax" selected></option>
<option i18n="SameSite_Strict" value="strict"></option>
</select>
</div>
Expand All @@ -249,6 +249,7 @@
<input id="httpOnly-checkbox-new" class="httpOnly checkbox" type="checkbox">
</div>
</div>
<div class="error-message error" style="display: none"></div>
</div>
</div>

Expand Down