Ad-report admin recipient via ADMIN_EMAIL env only (siteConfig is public)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-07 07:59:26 -05:00
parent 4991fe96e8
commit 3a6d9d037c
+1 -1
View File
@@ -715,7 +715,7 @@ const server = http.createServer(async (req, res) => {
const who = (s && s.email) || '';
const rec = await reports.add(b.campaignId, who, b.reason, b.note);
try {
const adminEmail = siteConfig().adminEmail || process.env.ADMIN_EMAIL || '';
const adminEmail = process.env.ADMIN_EMAIL || ''; // private env only — siteConfig is exposed via /api/config
if (adminEmail && mailer.hasKey()) {
mailer.send(adminEmail, 'Ad reported on InstantAdPay (campaign #' + rec.campaignId + ')',
'A member flagged an ad.\n\nCampaign: #' + rec.campaignId + '\nReason: ' + rec.reason