Skip to content

adding new additional submit_to option on the cookie consent module#5193

Open
TomJaeger wants to merge 2 commits into7.devfrom
consent-redirect-action
Open

adding new additional submit_to option on the cookie consent module#5193
TomJaeger wants to merge 2 commits into7.devfrom
consent-redirect-action

Conversation

@TomJaeger
Copy link
Copy Markdown
Contributor

adding new additional submit_to option on the cookie consent module

@TomJaeger
Copy link
Copy Markdown
Contributor Author

@codex please review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d8ccd2af4d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

if ($submit_to === 'action_id') {
return ee()->functions->fetch_site_index(0, 0) . QUERY_MARKER . 'ACT=' . $action_id;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve URL session ID for action_id submissions

Using fetch_site_index(0, 0) in the submit_to='action_id' branch drops URL-based session tokens (/S=.../), so on installs that rely on non-cookie sessions this POST is handled as a new guest session instead of the current member session. In that context, consent updates can be recorded against the anonymous visitor (or fail CSRF/session validation) rather than the logged-in member, which makes this option unreliable for affected deployments.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant