refactor(security): harden CommandAuthorized plumbing
This commit is contained in:
1 parent
31e8ecca10
commit
69ba2765de
16 files changed
+92
-56
No files matched your search
@@ -58,3 +58,11 @@ export function hasInlineCommandTokens(text?: string): boolean {
|
||||
if (!body.trim()) return false;
|
||||
return /(?:^|\s)[/!][a-z]/i.test(body);
|
||||
}
|
||||
|
||||
export function shouldComputeCommandAuthorized(
|
||||
text?: string,
|
||||
cfg?: ClawdbotConfig,
|
||||
options?: CommandNormalizeOptions,
|
||||
): boolean {
|
||||
return isControlCommandMessage(text, cfg, options) || hasInlineCommandTokens(text);
|
||||
}
|
||||
Reference in new issue
Block a user