Skip to content

Commit 1ee9b2e

Browse files
committed
Fix GHSL-2026-037_Wekan.
Thanks to GHSL and xet7.
1 parent 8c00adc commit 1ee9b2e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

server/publications/settings.js

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,25 @@
11
import { ReactiveCache } from '/imports/reactiveCache';
22

3-
Meteor.publish('globalwebhooks', async () => {
3+
Meteor.publish('globalwebhooks', async function() {
4+
if (!this.userId) {
5+
return this.ready();
6+
}
7+
8+
const user = await ReactiveCache.getCurrentUser();
9+
if (!user || !user.isAdmin) {
10+
return this.ready();
11+
}
12+
413
const boardId = Integrations.Const.GLOBAL_WEBHOOK_ID;
514
const ret = await ReactiveCache.getIntegrations(
615
{
716
boardId,
817
},
9-
{},
18+
{
19+
fields: {
20+
token: 0,
21+
},
22+
},
1023
true,
1124
);
1225
return ret;

0 commit comments

Comments
 (0)