export function collectMattermostSlashCallbackPaths(
raw?: MattermostSlashCommandConfigInput,
): string[] { const paths = new Set<string>([normalizeCallbackPath(raw?.callbackPath)]); const callbackUrl = readTrimmedString(raw?.callbackUrl); if (callbackUrl) { try { const pathname = new URL(callbackUrl).pathname; if (pathname) {
paths.add(pathname);
}
} catch { // Keep the normalized callback path when the configured URL is invalid.
}
} return [...paths];
}
export function resolveMattermostGatewayAuthBypassPaths(cfg: {
channels?: Record<string, unknown>;
}): string[] { const base =
cfg.channels?.mattermost && typeof cfg.channels.mattermost === "object"
? (cfg.channels.mattermost as MattermostConfigInput)
: undefined; const callbackPaths = new Set(
collectMattermostSlashCallbackPaths(readMattermostCommands(base?.commands)).filter(
isMattermostBypassPath,
),
); const accounts = base?.accounts ?? {}; for (const account of Object.values(accounts)) { const accountConfig =
account && typeof account === "object" && !Array.isArray(account)
? (account as MattermostAccountConfigInput)
: undefined; for (const path of collectMattermostSlashCallbackPaths(
readMattermostCommands(accountConfig?.commands),
)) { if (isMattermostBypassPath(path)) {
callbackPaths.add(path);
}
}
} return [...callbackPaths];
}
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.14Bemerkung:
(vorverarbeitet am 2026-06-07)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.