Skip to content

Commit 0638e66

Browse files
authored
fix(webapp): incorrect user domain parsing for UPN format (#1431)
Fix username parsing logic to correctly handle UPN and down-level formats. Only splits DOMAIN\user format; preserves user@domain.com as-is. Issue: DGW-297
1 parent ba8c4c2 commit 0638e66

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

webapp/src/client/app/shared/services/utils/string.service.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export class StringService {
1717
this.utils = parent;
1818
}
1919

20-
//DOMAIN\username or username@DOMAIN
20+
//DOMAIN\username
2121
extractDomain(fullUsername: string): ExtractedUsernameDomain {
2222
const extractionData: ExtractedUsernameDomain = {
2323
username: fullUsername,
@@ -27,9 +27,6 @@ export class StringService {
2727
if (fullUsername.includes('\\')) {
2828
extractionData.domain = fullUsername.split('\\')[0];
2929
extractionData.username = fullUsername.split('\\')[1];
30-
} else if (fullUsername.includes('@')) {
31-
extractionData.domain = fullUsername.split('@')[1];
32-
extractionData.username = fullUsername.split('@')[0];
3330
}
3431
return extractionData;
3532
}

0 commit comments

Comments
 (0)