mirror of
https://github.com/owncast/owncast.git
synced 2024-11-24 05:38:58 +03:00
Add a sanity check to make sure the actor IRI exists
This commit is contained in:
parent
4e76fff0d0
commit
65f0673dba
1 changed files with 4 additions and 0 deletions
|
@ -71,6 +71,10 @@ func Verify(request *http.Request) (bool, error) {
|
|||
return false, errors.Wrap(err, "failed to resolve actor from IRI to fetch key")
|
||||
}
|
||||
|
||||
if actor.ActorIri == nil {
|
||||
return false, errors.New("actor IRI is empty")
|
||||
}
|
||||
|
||||
// Test to see if the actor is in the list of blocked federated domains.
|
||||
if isBlockedDomain(actor.ActorIri.Hostname()) {
|
||||
return false, errors.New("domain is blocked")
|
||||
|
|
Loading…
Reference in a new issue