fix: only allow UserActorType for ShareService
Docker Image CI / build-and-push-image (push) Waiting to run
Maintain Release Merge PR / update-release-pr (push) Waiting to run
release-please / release-please (push) Waiting to run
test / test (18.x) (push) Waiting to run
test / test (20.x) (push) Waiting to run
test / test (22.x) (push) Waiting to run

This commit is contained in:
KernelDeimos
2024-11-15 12:08:40 -05:00
parent 045259cefb
commit 69bfa60199
+3
View File
@@ -261,6 +261,9 @@ class ShareService extends BaseService {
],
handler: async (req, res) => {
const actor = Actor.adapt(req.user);
if ( ! (actor.type instanceof UserActorType) ) {
throw APIError.create('forbidden');
}
return await share_sequence.call(this, {
actor, req, res,
});