Test: Audit-Request-Kontext und Mail-Absender je Mandant
10 Prüfungen: IP/User-Agent null außerhalb eines Requests, Anzeigename und Reply-To des Mandanten, Plattform-Adresse bleibt, Header-Injection bereinigt, Rückfall auf Plattform-Defaults für Plattform-Mails. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,7 @@ export async function markMailFailed(mailLogId: string, error: string): Promise<
|
||||
* the platform address (SPF/DKIM alignment); only the display name and Reply-To vary.
|
||||
* Raw client on purpose: the worker has no tenant context; the MailLog row carries the tenant.
|
||||
*/
|
||||
async function tenantSender(mailLogId: string, config: MailConfig): Promise<{ from: string; replyTo?: string }> {
|
||||
export async function tenantSender(mailLogId: string, config: MailConfig): Promise<{ from: string; replyTo?: string }> {
|
||||
const log = await prisma.mailLog.findUnique({ where: { id: mailLogId }, select: { tenantId: true } });
|
||||
if (!log?.tenantId) return { from: mailFrom(config), replyTo: config.replyTo };
|
||||
const settings = await prisma.tenantSettings.findUnique({
|
||||
|
||||
Reference in New Issue
Block a user