mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 08:37:41 +00:00
fix(security): make allowFrom id-only by default with dangerous name opt-in (#24907)
* fix(channels): default allowFrom to id-only; add dangerous name opt-in * docs(security): align channel allowFrom docs with id-only default
This commit is contained in:
committed by
GitHub
parent
41b0568b35
commit
cfa44ea6b4
@@ -156,6 +156,7 @@ async function authorizeVoiceCommand(
|
||||
guildInfo,
|
||||
memberRoleIds,
|
||||
sender,
|
||||
allowNameMatching: params.discordConfig?.dangerouslyAllowNameMatching === true,
|
||||
});
|
||||
|
||||
const ownerAllowList = normalizeDiscordAllowList(
|
||||
@@ -163,11 +164,15 @@ async function authorizeVoiceCommand(
|
||||
["discord:", "user:", "pk:"],
|
||||
);
|
||||
const ownerOk = ownerAllowList
|
||||
? allowListMatches(ownerAllowList, {
|
||||
id: sender.id,
|
||||
name: sender.name,
|
||||
tag: sender.tag,
|
||||
})
|
||||
? allowListMatches(
|
||||
ownerAllowList,
|
||||
{
|
||||
id: sender.id,
|
||||
name: sender.name,
|
||||
tag: sender.tag,
|
||||
},
|
||||
{ allowNameMatching: params.discordConfig?.dangerouslyAllowNameMatching === true },
|
||||
)
|
||||
: false;
|
||||
|
||||
const authorizers = params.useAccessGroups
|
||||
|
||||
Reference in New Issue
Block a user