mirror of
https://github.com/nkanaev/yarr.git
synced 2026-05-02 07:17:41 +00:00
restrict private IP access
This commit is contained in:
@@ -513,6 +513,10 @@ func (s *Server) handlePageCrawl(c *router.Context) {
|
||||
})
|
||||
return
|
||||
}
|
||||
if isInternalFromURL(url) {
|
||||
log.Printf("attempt to access internal IP %s from %s", url, c.Req.RemoteAddr)
|
||||
return
|
||||
}
|
||||
|
||||
body, err := worker.GetBody(url)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user