mirror of
https://github.com/fosrl/pangolin.git
synced 2026-02-18 23:46:23 +00:00
Clean email
This commit is contained in:
@@ -139,7 +139,7 @@ export async function signSshKey(
|
||||
if (!userOrg.pamUsername) {
|
||||
if (req.user?.email) {
|
||||
// Extract username from email (first part before @)
|
||||
usernameToUse = req.user?.email.split("@")[0];
|
||||
usernameToUse = req.user?.email.split("@")[0].replace(/[^a-zA-Z0-9_-]/g, "");
|
||||
if (!usernameToUse) {
|
||||
return next(
|
||||
createHttpError(
|
||||
|
||||
Reference in New Issue
Block a user