Skip to content

Commit

Permalink
Hindrer potensiell logging av personinfo ved valideringsfeil på varsler
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-nom committed Jul 2, 2024
1 parent b18cc6a commit 5ae04ed
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/server/src/notifications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ const varselSchema = z
})
.nullable()
.catch((ctx) => {
// Don't log fields which may contain sensitive information
const redactedInput = { ...ctx.input, tekst: null, link: null };
console.error(
`Error validating notification - ${JSON.stringify(ctx.input)}`,
`Error validating notification - ${JSON.stringify(redactedInput)}`,
);
return null;
});
Expand Down

0 comments on commit 5ae04ed

Please sign in to comment.