dsfjk44656 2012-10-13 20:31
浏览 45
已采纳

为什么我不能提交包含函数fgets()的文本? [关闭]

I use my website to code (and progress in my programming projects) online, during school, and send the code to my email address to continue working on it at home.

The text can be inside a <textarea> or an <input> field (with name="Code" id="Code").
Either way, I'm unable to submit text that contains the C/C++ function fgets():

TODO: Include a more stable function to get user input,
      such as fgets(input, 20, stdin);

I have no idea why submitting the text: fgets(input, 20, stdin) would be a problem, and why any text inside a <textarea> or <input> would be a problem since it's all just plain text, and not actual code.

When I click submit, while text in my <textarea> contains fgets(), nothing happens (instead of giving me Invalid input message or Email Sent message), and my text isn't being sent.

  • 写回答

2条回答 默认 最新

  • douhutongvm382381 2012-10-13 20:36
    关注

    It may be that something on your server sees this as an attempt to hack the site.

    A quick Googling shows that mod_security (a fairly common Apache module that attempts to prevent things like SQL injection and other exploits) may be blocking POST parameters that include fgets() calls. http://forums.modx.com/thread?thread=9677

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度