Stripping certain $_GET vars
-
After much debugging, here is what I have found.
Hooking into admin_init and dumping $_GET, everything is correct. I believe because when I did this it was before the LS plugin was loaded.
If I dump $_GET anywhere after that, say in the middle of the page, any variable that begins with an underscore is missing.
This is problematic because that means the _wpnonce holder is gone, causing nonce verification/security check to fail. The variable still exists if checking $_REQUEST.
It’s not exclusive to _wpnonce though.
For example, this link https://domain.com/wp-admin/admin.php?page=wpforms-overview&action=duplicate&_foo=bar&form_id=625&_wpnonce=2a192a0d1b
Checking $_GET during admin page output both _wpnonce and _foo do not exist. Checking $_GET on admin_init everything is correct. Deactivating the LiteSpeed Cache plugin resolves the issue.
I also tried adding /wp-admin/admin.php to the Do Not Cache Rules but that didn’t seem to help.
- The topic ‘Stripping certain $_GET vars’ is closed to new replies.