调试403错误 [英] Debug a 403 error

查看:118
本文介绍了调试403错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

具有SSL证书的域( https://www.example.com/form.html )上的简单html表单定义如下:



< form method =postaction =https://www.example.com/processForm.php>



当我发布表单时,我收到了一条403错误消息



我已经广泛搜索了解决方案。我发现:


  • 表单内容中的网址应该被编码

  • 可能有权限需要解决的问题 .htaccess

  • 表单方法属性可能不正确

  • action属性可能是错误的(例如,缺少 www。


我已经检查了上述每一项,但没有解决问题。

可能存在403错误的其他原因?

解决方案

您的目标网址可能需要CSRF令牌才能防止跨网站请求伪造。请阅读 https://www.owasp.org/index.php/ Cross-Site_Request_Forgery_%28CSRF%29


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?

解决方案

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

这篇关于调试403错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆