mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
fixes #1619 Secure PhantomJS Png rendering
removes auth hack to allow phantomjs to query pages as a user without auth. Instead we pass phantomjs the session cookie, which it then includes in the request.
This commit is contained in:
@@ -22,13 +22,6 @@ func getRequestUserId(c *Context) int64 {
|
||||
return userId.(int64)
|
||||
}
|
||||
|
||||
// TODO: figure out a way to secure this
|
||||
if c.Req.URL.Query().Get("render") == "1" {
|
||||
userId := c.QueryInt64(SESS_KEY_USERID)
|
||||
c.Session.Set(SESS_KEY_USERID, userId)
|
||||
return userId
|
||||
}
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user