Skip to content

Commit 69bfa60

Browse files
committed
fix: only allow UserActorType for ShareService
1 parent 045259c commit 69bfa60

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/backend/src/services/ShareService.js

+3
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,9 @@ class ShareService extends BaseService {
261261
],
262262
handler: async (req, res) => {
263263
const actor = Actor.adapt(req.user);
264+
if ( ! (actor.type instanceof UserActorType) ) {
265+
throw APIError.create('forbidden');
266+
}
264267
return await share_sequence.call(this, {
265268
actor, req, res,
266269
});

0 commit comments

Comments
 (0)