dsgfdgh14569 2014-09-13 17:32
浏览 70
已采纳

将Google表单的服务器端验证复制粘贴到WordPress页面

I embedded a Google Form in my WordPress site by copy-pasting its source code into the page. Will I need "server side validation" for a Google Form?

Data submitted to Google Form is sent to Google Drive, therefore malicious code cannot harm my website - am I wrong? (Just to be extra clear...is data submitted to Google Form sent to my WordPress database?)

I am using some client side validation:

<input type="email" required="required" /> 

Edit

One more question. As long as the action has google's link

<form action="google form link"> 

then I am safe? So if I leave the action blank then it is no longer a Google Form, and data will be sent to my WordPress database?

  • 写回答

1条回答 默认 最新

  • douyu9433 2014-09-13 18:23
    关注

    I would discourage you from copy-pasting the Google Form into your WordPress page, because then you run the risk of Google changing something in their form processing code in the future, so that your form will no longer submit properly. The supported way is to use the embed code provided by Google which uses an <iframe> tag to insert the form into your page.

    To answer the actual question: since the action parameter of the <form> tag determines which URL the input data will be submitted to, if that URL points to Google's servers, then the data will not reach your server, and therefore you do not need to validate it on the server side.

    If you leave the action parameter blank, the data will be sent to the current URL (your WordPress page), but since WordPress is not prepared to handle Google Form submissions, it will silently discard your data. Therefore it will not be saved to your WordPress database.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 怎么在stm32门禁成品上增加记录功能
  • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面
  • ¥50 NT4.0系统 STOP:0X0000007B
  • ¥15 想问一下stata17中这段代码哪里有问题呀
  • ¥15 flink cdc无法实时同步mysql数据
  • ¥100 有人会搭建GPT-J-6B框架吗?有偿
  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 解riccati方程组