mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 16:12:30 +08:00
CodeQL: Try to fix uncontrolled data used in path expression (#43462)
Ref #43080
This commit is contained in:

committed by
GitHub

parent
2a766c6a04
commit
f6414ea2b2
@ -144,6 +144,17 @@ type JSONData struct {
|
||||
Executable string `json:"executable,omitempty"`
|
||||
}
|
||||
|
||||
func (d JSONData) DashboardIncludes() []*Includes {
|
||||
result := []*Includes{}
|
||||
for _, include := range d.Includes {
|
||||
if include.Type == TypeDashboard {
|
||||
result = append(result, include)
|
||||
}
|
||||
}
|
||||
|
||||
return result
|
||||
}
|
||||
|
||||
// Route describes a plugin route that is defined in
|
||||
// the plugin.json file for a plugin.
|
||||
type Route struct {
|
||||
|
Reference in New Issue
Block a user