[Support request] "URL contains a form with a GET method"

Home Forums Support "URL contains a form with a GET method"

This topic contains 1 reply, has 2 voices, and was last updated by  Tom 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #901854

    Clare

    Hi Guys,

    After some annoying spam problems using my search form, I’m running my site through SiteBulb, and it reports the following on my 404 page: “URL contains a form with a GET method”, and states these as the potential pitfalls “These URLs can be cached, and accessed directly by anyone that knows the URL (including search engine crawlers).
    If there are no restrictions on the input fields, this can allow the generation of infinite unique URLs.”

    It says this is the problem:
    <p>It seems we can’t find what you’re looking for. Perhaps searching can help.</p>
    <form method=”get” class=”search-form” action=”https:// my domain .com/”>

    I am not very techhy and a bit dumb about this stuff, but is it necessary or possible to change this to “post” or something? I’ve been having a problem lately with spam links being generated from my search bar and millions of Korean porn links pointing to these non-existent pages.. could this be the issue?

    I look forward to hearing from you – and congratulations on your 5th Birthday!!
    Clare

    #902125

    Tom Lead Developer

    Hi there,

    The form itself is provided by WordPress – we use the get_seach_form() function to generate it here: https://github.com/tomusborne/generatepress/blob/2.2.2/no-results.php#L63

    You can remove it by creating a child theme, and copying the no-results.php file into it. Then you can remove that function and the form should go away.

    I don’t believe it’s possible to change it to post.

    Let me know if you need more info 🙂

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.