开发者

Can you call forms with a POST from a frame

I have a classic ASP system that utilizes Frames today but I need to lock down the system for CSS and CSRF. I am newer to this language but have been serching for days and can't find the answer.

I would like to change the calls to the forms from Gets to Post. Do I need to re-write the aplication to all another Form level in between to accomplish this? Here is the Frame

<FRAMESET  COLS="46%,*">
    <FRAME NAME="M_LFrame" SRC="M_LFrm.asp" MARGINWIDTH="开发者_高级运维5" MARGINHEIGHT="5" SCROLLING="auto" FRAMEBORDER="no">
    <FRAME NAME="M_RFrame" SRC="M_RFrm.asp" MARGINWIDTH="0" MARGINHEIGHT="0" SCROLLING="auto" FRAMEBORDER="yes">
</FRAMESET>

Both forms with the M_LFrm.asp and the M_RFrm.asp have asp logic calling the Database for information. Prior to calling the DB I would like to have a CSRF token check but am unsure how to pass a token into these forms as they are through Frames which are Gets and visible. Is there a way to call these forms with a POST?

Thank you.


In classic asp using a POST instead of a GET is a matter of changing your form from method="get" to method="post".

The ASP code that handles the form data will have a "request.querystring()" or "request()" instruction for fetching the form data.

  • request.querystring("[formfield name]") can access GET data
  • request.form("[formfield name]") can access POST data
  • request("[formfield name]") can access both POST and GET data

So to change the code from using GET to POST, in the ASP code you will need to change any request.querystring() instructions to request.form() or simply request()

hope this helps,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜