mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 05:42:25 -05:00
[bugfix] Fix potential dereference of accounts on own instance (#757)
* add GetAccountByUsernameDomain * simplify search * add escape to not deref accounts on own domain * check if local + we have account by ap uri
This commit is contained in:
parent
2ca234f42e
commit
570fa7c359
8 changed files with 243 additions and 92 deletions
|
|
@ -36,6 +36,9 @@ type Account interface {
|
|||
// GetAccountByURL returns one account with the given URL, or an error if something goes wrong.
|
||||
GetAccountByURL(ctx context.Context, uri string) (*gtsmodel.Account, Error)
|
||||
|
||||
// GetAccountByUsernameDomain returns one account with the given username and domain, or an error if something goes wrong.
|
||||
GetAccountByUsernameDomain(ctx context.Context, username string, domain string) (*gtsmodel.Account, Error)
|
||||
|
||||
// UpdateAccount updates one account by ID.
|
||||
UpdateAccount(ctx context.Context, account *gtsmodel.Account) (*gtsmodel.Account, Error)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue