Skip to content

Cookies in admin-ajax.php?action=as_async_request_queue_runner call with too many backslashes #1230

Open
@OnGe333

Description

@OnGe333

We are getting error AH00561: Request header exceeds LimitRequestFieldSize: Cookie - in other words, too much cookie data, Apache is not processing it, Wordpress is not getting any cookies at all. In the log I could find that large cookie data is almost always at the call /wp-admin/admin-ajax.php?action=as_async_request_queue_runner

The problem seems to be caused by excessive backslashing of cookie data. In our case, the problem is a cookie containing JSON, where it inserts \ before " and next logged request with this data has double the number of backslashes. This seems to continue until it hits the cookie data size limit. After few calls, the result looks like this:

pys_advanced_form_data={\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"first_name\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Jan\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"last_name\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"Nov\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\u00e1k\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"email\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"redacted@gmail.com\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\",\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"phone\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\":\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"123456789\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"}

The cookie shown here is from the PixelYourSite plugin, but the same problem occurs with any other cookie containing JSON.

I have not been able to find the cause of the problem, but it seems to be in Action Scheduler. The problem manifests itself exclusively when calling /wp-admin/admin-ajax.php?action=as_async_request_queue_runner

Due to the asynchronous nature, I am having trouble debugging it, so I don't have way how to replicate error. If you can give me advice how to do it, I will be happy to provide more information.

Tested on WordPress/6.7.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority: highThe issue/PR is high priority—it affects lots of customers substantially, but not critically.type: bugThe issue is a confirmed bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions