mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(api): limit autoproxy member patch to own system
This commit is contained in:
parent
f0aa48f00a
commit
5c0472eb95
1 changed files with 4 additions and 0 deletions
|
|
@ -57,7 +57,11 @@ public class AutoproxyControllerV2: PKControllerBase
|
|||
|
||||
PKMember? member = null;
|
||||
if (updateMember)
|
||||
{
|
||||
member = await ResolveMember(data.Value<string>("autoproxy_member"));
|
||||
if (member != null && ContextFor(member) != LookupContext.ByOwner)
|
||||
throw Errors.GenericMissingPermissions;
|
||||
}
|
||||
|
||||
var patch = AutoproxyPatch.FromJson(data, member?.Id);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue