<p><a href="https://golang.org/doc/articles/wiki/#tmp_11">https://golang.org/doc/articles/wiki/#tmp_11</a></p>
<p>It says that "a user can supply an arbitrary path to be read/written on the server." How? could someone provide a quick url that provides an arbitrary path? </p>
<p>You can't leave the current directory as far as I can tell because <code>..</code> will go to a different handler. e.g. <code>localhost:8080/edit/../hi</code> won't work, it becomes <code>localhost:8080/hi</code>. I tried the encoded versions <code>%2e</code> and that doesn't work either. It just results in a different path for the url.</p>
<p>how would I really exploit this as a security vulnerability?</p>
<hr/>**评论:**<br/><br/>gohacker: <pre><p>On windows you can use <code>\</code> (%5c). On unixes you probably cannot exploit it because of <a href="https://github.com/golang/go/blob/af15beeab5ff9cde411c3db086ca9a24ace4c898/src/net/http/server.go#L1821-L1836" rel="nofollow">cleanPath</a> func.</p></pre>nhooyr: <pre><p>interesting. thanks!</p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传