dppb79372 2016-02-12 17:58
浏览 62

403-禁止在PHP中提供某些请求的文件

My PHP page script is responding with 403-Access forbidden for some http requests while for some requests its responding properly.

For the below request (By ajax) I'm getting 403-Access forbidden

POST http://xxxx./xxx/xxx/xxx/xxxx/interaction/practitioner HTTP/1.1
Host: xxxx
Connection: keep-alive
Content-Length: 2520
Accept: */*
Origin: http://xxx
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.267 Safari/537.36
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
Referer: http://xxxx./xxx/xxx/xxx/xxxx/index.php
X-Citrio-Timestamp: Wht/CLSj01IhGLSPNfWemGXwGww= 2016-02-12T17:41:39.961Z
Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
Cookie: PHPSESSID=c83cae9c3bc88a4b8ff7ea3c3b279a22

{JSON DATA}


But, another request to same page is responding properly with different JSON DATA.

Means, for a particular data its giving 403-access forbidden and for some data its responding properly.

The php scripts contains 10-20 functions but, both requests are calling the same function.. {Register user with timetable ids.}

</div>
  • 写回答

1条回答 默认 最新

  • doukuang1897 2017-11-21 13:47
    关注

    Not really a tech answer, but I asked the providers of our shared multi-site reseller hosting if a ModSec rule could be the cause of this, i.e. inconsistent blocking of an ajax POST with a 403 being returned on fail. They (NetHosted: brilliant support, always) had a look at their end and then disabled a couple of ModSec rules they could see were being triggered. That was the fix.

    评论

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么