Problem/Motivation

Every on-demand request appends an ajax_page_state query string that includes the base64 library state and, notably, ajax_page_state[theme_token], a CSRF token. It is therefore written into web-server and proxy access logs. Measured: about 571 characters of library blob within 811 query characters, on 14 of 14 requests. This is the same overhead as the earlier P6 note but with a security angle that was not separately filed.

Steps to reproduce

  • Trigger a fragment, branch, context, delivery, or refresh request.
  • Inspect the request query string and the server access log; note the theme_token value is present in both.

Proposed resolution

  • Send the ajax_page_state payload in a POST body rather than a GET query string, matching core's convention.
  • At minimum, stop including theme_token in a GET query string.

Remaining tasks

  • Confirm the token no longer appears in logs.

User interface changes

None.

API changes

Changes how the ajax_page_state parameter is transported.

Data model changes

None anticipated.

AI-Generated: Yes (Used Opus 5 and DeepSeek Flash to review and discover these issues)

Comments

freelock created an issue. See original summary.

  • freelock committed 3ab467be on 1.0.x
    fix: #3623181 ajax_page_state in GET query strings leaks a CSRF token...
freelock’s picture

Status: Active » Fixed

Fixed.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.