lovegpt / backend /src /utils /privacyGuard.ts
Crownelius's picture
Rebrand OpenDateBase to loveGPT
7de48b6 verified
Raw
History Blame Contribute Delete
1.05 kB
const privacyLookupPatterns = [
/\b(find|look\s*up|lookup|search|identify|track|locate|doxx?|reveal|get)\b(?=.{0,120}\b(person|someone|user|profile|match|candidate|woman|man|girl|guy|name|address|phone|email|social|instagram|facebook|details|where)\b)/i,
/\b(phone number|email address|home address|street address|full name|last name|ssn|social security|where does .* live|where do .* live)\b/i
];
export function isPrivacyLookupRequest(value: string): boolean {
const lowered = value.toLowerCase();
if (lowered.includes("my ") && !/(find|lookup|look up|search|dox)/i.test(value)) {
return false;
}
return privacyLookupPatterns.some((pattern) => pattern.test(value));
}
export function privacyRefusalText(): string {
return [
"I cannot help find, identify, or expose personal details about another person.",
"loveGPT only uses profile information for consent-based compatibility work.",
"Answer the current profile question about your own preferences and boundaries instead."
].join(" ");
}