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条)

报告相同问题?

悬赏问题

  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料