Delete unused login and invite tokens on a daily job, and keep their URLs out of logs.
Expired sign-in, save-progress, email-change, and invitation tokens (and any draft they carry) are cleared by a Cloudron scheduler task. Page timing logs record the path without the query string, and mail failures log a request id instead of an address.
This commit is contained in:
1 parent
73d0856004
commit
46c34a6323
28 files changed
+636
-45
No files matched your search
+3
-2
@@ -5,6 +5,7 @@ import {
|
||||
buildWorkshopInboxMail,
|
||||
type WorkshopInquiryMailInput,
|
||||
} from "../workshopSignupMail";
|
||||
import { MAGIC_LINK_TTL_MINUTES } from "../privacyRetention";
|
||||
import { getSmtpUrl } from "./env";
|
||||
import {
|
||||
buildRuleStakeholderInviteMail,
|
||||
@@ -85,7 +86,7 @@ export async function sendMagicLinkEmail(
|
||||
): Promise<void> {
|
||||
const { text, html } = buildVerifyLinkParts(
|
||||
verifyUrl,
|
||||
"Open this link to log in (it expires in 60 minutes):",
|
||||
`Open this link to log in (it expires in ${MAGIC_LINK_TTL_MINUTES} minutes):`,
|
||||
"If you did not request this, you can ignore this email.\n\nSent because you saved a draft at communityrule.info",
|
||||
"Log in",
|
||||
);
|
||||
@@ -174,7 +175,7 @@ export async function sendEmailChangeEmail(
|
||||
): Promise<void> {
|
||||
const { text, html } = buildVerifyLinkParts(
|
||||
verifyUrl,
|
||||
"You asked to change the email on your Community Rule account.\n\nOpen this link to confirm the new address (it expires in 60 minutes):",
|
||||
`You asked to change the email on your Community Rule account.\n\nOpen this link to confirm the new address (it expires in ${MAGIC_LINK_TTL_MINUTES} minutes):`,
|
||||
"If you did not request this change, you can ignore this email. Your current login is unchanged until you confirm.",
|
||||
"Confirm email",
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user