ilihai
V2EX  ›  问与答

lamp 服务器,即便不注重权限管理的话,通过浏览器能这样访问?

  •  
  •   ilihai · Jul 17, 2015 · 2984 views
    This topic created in 3979 days ago, the information mentioned may be changed or developed.
    一个错误日志如下:

    [Tue Jul 14 07:37:15.947145 2015] [core:error] [pid 28009:tid 139916302333696] [client 162.221.202.241:43117] AH00126: Invalid URI in request GET ../../../../../../../../etc/sysconfig/network-scripts/ifcfg-eth1 HTTP/1.1, referer: http://www.example.com

    看的出来它想访问/etc/sysconfig/network-scripts/ifcfg-eth1
    能吗?不能吧?能吗...
    3 replies    2015-07-17 20:25:35 +08:00
    imn1
        1
    imn1  
       Jul 17, 2015
    你试试 ../../../../../../../../home/xxx/test/test.html 就知道了
    etc还是有权限的
    BOYPT
        2
    BOYPT  
       Jul 17, 2015
    取决于你的http服务器。
    apache的话,是不可能访问DocumentRoot 节点以上的其他文件的,但是如果程序有bug的情况除外……
    ilihai
        3
    ilihai  
    OP
       Jul 17, 2015
    好吧,我有空试试。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1036 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 19:09 · PVG 03:09 · LAX 12:09 · JFK 15:09
    ♥ Do have faith in what you're doing.