Debug a 403 error

2019-09-19 04:46发布

问题:

A simple html form on a domain with an ssl certificate (https://www.example.com/form.html) is defined like this:

<form method="post" action="https://www.example.com/processForm.php">

When I post the form I get a 403 error message

I have searched extensively for solutions. I found that:

  • urls in the form content should be encoded
  • there might be a permission problem to be resolved in .htaccess
  • form method attribute might be incorrect
  • action attribute might be erroneous (for example missing the www.)

I have checked each of the above and not fixed the problem.

What other reasons may exist for a 403 error?

回答1:

Your target url may required a CSRF token to prevent Cross-Site Request Forgery. Read more at https://www.owasp.org/index.php/Cross-Site_Request_Forgery_%28CSRF%29



标签: php html forms