mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-02 12:00:23 +00:00
refactor(security): enforce account-scoped pairing APIs
This commit is contained in:
@@ -74,6 +74,7 @@ async function sendLinePairingReply(params: {
|
||||
const { code, created } = await upsertChannelPairingRequest({
|
||||
channel: "line",
|
||||
id: senderId,
|
||||
accountId: context.account.accountId,
|
||||
});
|
||||
if (!created) {
|
||||
return;
|
||||
@@ -121,7 +122,11 @@ async function shouldProcessLineEvent(
|
||||
const senderId = userId ?? "";
|
||||
const dmPolicy = account.config.dmPolicy ?? "pairing";
|
||||
|
||||
const storeAllowFrom = await readChannelAllowFromStore("line").catch(() => []);
|
||||
const storeAllowFrom = await readChannelAllowFromStore(
|
||||
"line",
|
||||
process.env,
|
||||
account.accountId,
|
||||
).catch(() => []);
|
||||
const effectiveDmAllow = normalizeDmAllowFromWithStore({
|
||||
allowFrom: account.config.allowFrom,
|
||||
storeAllowFrom,
|
||||
|
||||
Reference in New Issue
Block a user