security: sanitize markdown output and reduce PII logging

- Add isomorphic-dompurify to sanitize rendered docs HTML and Terms of Service
- Remove addLdapUser full-object logging that included password hashes
- Log only error name/message on auth/login failures instead of full LDAP error objects

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2026-07-18 22:56:35 -04:00
parent 1b3e842006
commit 07819a6254
6 changed files with 537 additions and 11 deletions
+1 -2
View File
@@ -187,7 +187,6 @@ async function addLdapUser(client, data){
delete data.userPassword;
}
console.log('addLdapUser', data)
group = await addPosixGroup(client, data);
data = await addPosixAccount(client, group);
@@ -889,7 +888,7 @@ User.login = async function(data){
return user;
}catch(error){
console.error("USER LOGIN error:", error);
console.error("USER LOGIN error:", error.name, error.message);
throw error;
}
};