Skip to content

fix: use SameSite=None for embed cookie#743

Merged
mcdurdin merged 1 commit into
stagingfrom
fix/15957-embed-query
May 18, 2026
Merged

fix: use SameSite=None for embed cookie#743
mcdurdin merged 1 commit into
stagingfrom
fix/15957-embed-query

Conversation

@mcdurdin
Copy link
Copy Markdown
Member

In order for the cookie to be set on Keyman for Windows embed keyboard search, we need SameSite=None, because otherwise Chromium will block it as a cross-site cookie, due to the the embed being in an iframe.

Relates-to: keymanapp/keyman#15957
Test-bot: skip

In order for the cookie to be set on Keyman for Windows embed keyboard
search, we need SameSite=None, because otherwise Chromium will block
it as a cross-site cookie, due to the the embed being in an iframe.

Relates-to: keymanapp/keyman#15957
Test-bot: skip
@keymanapp-test-bot
Copy link
Copy Markdown

User Test Results

Test specification and instructions

User tests are not required

//
// Note: 'SameSite=None; secure' is required for embedding in Keyman
// Configuration for Windows because that uses an iframe to embed the search
setcookie('embed_keyboards_no_locale_redirect', '1', ["secure" => true, "samesite" => 'None', 'path' => '/']);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, this uses a different casing from ll 3-4?

session_set_cookie_params(["SameSite" => "None"]);   // Allow use in iframe, needed for Download Keyboards dialog
    session_set_cookie_params(["Secure" => "true"]);     // None requires Secure to be set

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah seems slightly different, but PHP appears not to care.

Copy link
Copy Markdown
Contributor

@darcywong00 darcywong00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcdurdin mcdurdin merged commit 6040ea0 into staging May 18, 2026
6 checks passed
@mcdurdin mcdurdin deleted the fix/15957-embed-query branch May 18, 2026 13:38
@github-project-automation github-project-automation Bot moved this from Todo to Done in Keyman May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants