Malformed cookie redaction patterns received
-
In the Error_log file in the root of a few domains, I get the error:
Malformed cookie redaction patterns received
Is this coming from WordFence?
I can’t find this error anywhere on the internet. I did find a variant “Failed to retrieve cookie redaction patterns: Request failed” in the redirection plugin forum, and someone mentions there that it seems to be coming from WordFence.
Thanks
JP
-
Hi @jpnl, thanks for dropping us a message about this.
That is a Wordfence request as we added
action=get_cookie_redaction_patternsin a plugin update around July this year. This failure is a sign that the WAF isn’t able to update patterns correctly. If concurrent hits to our servers happen to trigger the weekly scheduled update, the first may succeed but this can happen with the second request in rare cases, possibly due to rate limiting.If you repeatedly receive this message or are also seeing errors when updating rules, you could navigate to your wp-content/wflogs folder using FTP or your host’s file manager and delete the contents entirely. Wordfence should try to repopulate it within 30 minutes so could solve any issues if the files are corrupted or unusually large.
Thanks,
Peter.
Thanks. Had a look and checked on 31 sites. This error occurs on 12 of them, some on a weekly basis even until now. Removed the wflogs folder ander will check back later to see if it’s gone.
In general, shouldn’t there be some sort of error handling to get around this and not write an error_logs file?
Thanks
JPHi @jpnl,
We do often refactor code when updates or new features are added so I will mention this to the team. However, I will say that we sometimes utilize WordPress’
$wpdb->suppress_errors(true);function in situations we know an error may occur and it’s more expensive on resources to re-check. One such example may be when you’re using the MySQLi engine for logs instead of files, so we just want any attempts to write to these files to fail silently if they don’t exist. Query Manager, and possibly other tools can ignore this intentional error suppression built into WordPress and present them as issues.Thanks again,
Peter.
Thanks @wfpeter
When I check on 5/11, this error existed on 17 sites.
Today 14 days later i checked again and it only happened on 2 sites.Clearing the wflogs folder helped. Might be that I forgot to do that for the two remaining sites.
—
There was a new error in the log on some sites now though:Cron unschedule event fout voor hook: wordfence_start_scheduled_scan, foutcode: could_not_set, foutmelding: De lijst met cron-gebeurtenissen kon niet worden opgeslagen., gegevens: {“schedule”:false,”args”:[1668260400]}
Happened on 12, 15 and 17 November. There are different numbers:
1668260400
1668519600
1668519601Hi @jpnl,
The new error you’re seeing looks like a race condition that’s existed in WordPress for some time, but has only recently been handled with an error message such as this. If the job mentioned does not appear in your list of cron jobs any more, things should be fine so long as your scans are completing. This particular cron job mentioned just watches a running scan to ensure the scan finishes, and it does not need to be rescheduled when it ends. It’s likely that one of the hits succeeded, and this error is the result of the second.
Thanks again,
Peter.
Hi @wfpeter,
Whatever the case, I don’t think these errors should be logged by that. I mean, what’s the use of logging them?
Also, this only appears to happen on litespeed servers. I just checked
– 27 sites on litespeed, 23 had all sorts of errors* in the error_log, 4 didn’t have any.
– 10 sites on Apache, none of them had an error_logStrangely, WordFence somehow detects litespeeds/isapi for the extended firewall on both servers.
—
* Malformed cookie as reported in this ticket
* Unschedule event error as reported in this ticket
* WordPress database error Commands out of sync as reported in this ticket.All of these errors lead back to Wordfence. So the question remains: how can it be fixed?
Thanks
JPWe also today received this error. We are not using litespeed. We use Apache.
[06-Jan-2023 06:03:39 UTC] Failed to retrieve cookie redaction patterns: Request failedOliver
Keeping this one alive as we’ve received the error again today …
[24-Feb-2023 06:03:40 UTC] Failed to retrieve cookie redaction patterns: Request failedOliver
Still getting this error …
[14-Apr-2023 06:03:40 UTC] Failed to retrieve cookie redaction patterns: Request failed
The topic ‘Malformed cookie redaction patterns received’ is closed to new replies.