Analyse: Einwilligungs-Historie, Nachweis beim Einschalten, Sperre ohne Verantwortlichen-Angaben, Textform für Mitarbeiter
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c6824f83a6
commit
3d05472b25
14 files changed
+585
-115
No files matched your search
@@ -10,6 +10,7 @@ import { giteaFetch, splitRepo } from './giteaClient.js'
|
||||
import { envKey, decryptEnv, maskLog } from './previewEnv.js'
|
||||
import { saveRunLog } from './previewLogs.js'
|
||||
import * as runnerClient from './previewRunnerClient.js'
|
||||
import { analysePrivacyData } from './analysePrivacy.js'
|
||||
|
||||
const execFileAsync = promisify(execFile)
|
||||
|
||||
@@ -730,17 +731,14 @@ async function buildAnalytics(project) {
|
||||
} catch (err) {
|
||||
if (err.status !== 404) throw err
|
||||
}
|
||||
const clean = (v) => String(v ?? '').replace(/[\x00-\x1f\x7f]/g, ' ').replace(/\s+/g, ' ').trim()
|
||||
const company = clean(customer?.companyName || customer?.name).slice(0, 200).trim()
|
||||
const email = clean(customer?.email)
|
||||
if (!company || !email || email.length > 200 || !email.includes('@')) {
|
||||
const privacy = analysePrivacyData(customer)
|
||||
if (!privacy.ok) {
|
||||
console.warn(`[previewDeploy] Analyse fuer Projekt ${project.$id} uebersprungen: Firma oder E-Mail fehlt/ungueltig`)
|
||||
return null
|
||||
}
|
||||
const address = [clean(customer.street), clean(`${customer.postalCode || ''} ${customer.city || ''}`)].filter(Boolean).join(', ').slice(0, 300).trim()
|
||||
const stored = String(feature.accentColor || '').toLowerCase()
|
||||
const color = /^#[0-9a-f]{6}$/.test(stored) ? stored : '#111111'
|
||||
return { siteKey: feature.siteKey, color, privacy: { company, address, email } }
|
||||
return { siteKey: feature.siteKey, color, privacy: { company: privacy.company, address: privacy.address, email: privacy.email } }
|
||||
} catch (err) {
|
||||
console.warn(`[previewDeploy] Analyse-Abfrage fuer Projekt ${project?.$id} fehlgeschlagen: ${err.message}`)
|
||||
return null
|
||||
|
||||
Reference in new issue
Block a user