WordPress.org

Ready to get started?Download WordPress

Forums

BBQ: Block Bad Queries
[resolved] Log file and Configuration (5 posts)

  1. brucedongcai@gmail.com
    Member
    Posted 5 months ago #

    Team, great plugin! I am just wondering if there is a log file. so I can see what has been blocked. If I am want to add some bad string/query, is there a way to do it in BBQ (like setting or configuration area)? Thank you for helping!

    https://wordpress.org/plugins/block-bad-queries/

  2. Jeff Starr
    Member
    Plugin Author

    Posted 5 months ago #

    Thanks! BBQ is kept as simple as possible so no log files, but you should be able to see all traffic and errors via your server's access/error log files. Then to add a string, just open the plugin file and add whatever is necessary.

  3. brucedongcai@gmail.com
    Member
    Posted 5 months ago #

    jeff, thank you!
    re: "to add a string, just open the plugin file " - In the PHP file, which exact part that I can add the string? do you have the sample? or detail steps? I do not want to mess the file. Thank you

  4. Jeff Starr
    Member
    Plugin Author

    Posted 5 months ago #

    There are three variables defined as arrays on lines 21-23. Once you have identified the string you would like to block, add the string like so:

    $request_uri_array = apply_filters( 'request_uri_items', array('old-string', 'new-string', 'another-new-string', 'etc') );

    The trick is adding the string to the correct array; for example, if the string should be blocked when included in the user-agent, then add to user_agent_items. Likewise for the other two arrays, which contain strings for the requested URI and query string.

  5. brucedongcai@gmail.com
    Member
    Posted 5 months ago #

    Jeff, thank you for quick Reponses/Guidance. I will try. thank!!!

  6. brucedongcai@gmail.com
    Member
    Posted 5 months ago #

    Jeff, thank you for quick reply and guidance.:) Thank you!!!

Reply

You must log in to post.

About this Plugin

About this Topic

Tags