• Resolved Andrew Wilder

    (@eatingrules)


    Hi,

    I have now encountered this on two sites running v1.8.11 — when I go to Sucuri > Firewall (WAF) > Clear Cache, and then click the “Clear Cache” button, it shows an error message:

    “SUCURI: Firewall API key was not found.”

    However, I’ve double-checked that the API key is indeed set correctly in the Firewall settings tab (and it used to work!), for both sites where I saw this issue.

    Any ideas?

    Thanks,
    Andrew

Viewing 2 replies - 1 through 2 (of 2 total)
  • This is the code that powers that action [1].

    Notice how line 735 has the message that you are seeing, and by the logic of the rest of the code, this message appears only in two cases, one is when the API key is not present or has an invalid format, you already determined that the key exists and is valid, so the only explanation is that the code in line 740 is failing which forces line 742 to be skipped so the error message is not replaced by the success message in line 743.

    The line that is apparently failing is sending a HTTP request to the Sucuri Firewall API, so the problem here is not really with the plugin but with the other project. Please execute this command in your terminal emulation and let me know if there is any relevant information in the response. You can also contact me directly at [removed] (email removed to avoid spam) since this error involves sensitive information that we don’t want to expose to the public in this forum.

    # EXAMPLE   : (firewall key) acbd18db4cc2f8/37b51d194a7513
    # API_KEY   : (first   part) acbd18db4cc2f8
    # API_SECRET: (second  part) 37b51d194a7513
    
    curl "https://waf.sucuri.net/api?v2" \
    -d "k=API_KEY" \
    -d "s=API_SECRET" \
    -d "a=clear_cache" \
    -s | python -m json.tool

    [1] https://github.com/cixtor/sucuri-wordpress-plugin/blob/083973f/src/firewall.lib.php#L721-L752

    Thread Starter Andrew Wilder

    (@eatingrules)

    Hi Yorman,

    I’m embarrassed to say this, but I’ve actually forgotten which two sites I encountered this issue on. (I work on a lot of different sites, and it’s now slipped my mind…).

    If it happens again I’ll definitely follow up with the test you recommended. For now I’ll mark this as resolved. ??

    Thanks!

    – Andrew

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Clear cache button not working in 1.8.11’ is closed to new replies.