Require access to Still via method
This commit adds a safeguard to accessing the still from a specific component by requiring access via the component.GetStill method.
This commit is contained in:
parent
81fa84c244
commit
8235ea9105
63 changed files with 288 additions and 197 deletions
|
|
@ -58,7 +58,7 @@ func (next *Next) getInstance(r *http.Request) (wisski *wisski.WissKI, path stri
|
|||
}
|
||||
|
||||
// find the slug
|
||||
slug, ok := next.Config.HTTP.SlugFromHost(url.Host)
|
||||
slug, ok := component.GetStill(next).Config.HTTP.SlugFromHost(url.Host)
|
||||
if slug == "" || !ok {
|
||||
return nil, "", httpx.ErrBadRequest
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue