Describe the bug
If we have two users with similar usernames there is a chance they will get the other person's certificate.
e.g.
john
john.smith
john will get both his and john.smith's certs but will likely have john.smith's cert installed so will end up with certificate issues
To Reproduce
create two similar users that will get and use certificates, e.g. john and john.smith
Expected behavior
Each user should only get their certificate and have the correct one installed
Links
n/a
Screenshots
n/a
System Device (please complete the following information):
OS: Windows, Likely a Mac issue too
Version 10
Additional context
n/a
Possible Working Solution
change the following line in Distribute-UserCerts.ps1
$userCertFiles = Get-ChildItem -Path "$JCScriptRoot/UserCerts" -Filter "$($user.userName)*"
to
$userCertFiles = Get-ChildItem -Path "$JCScriptRoot/UserCerts" -Filter "$($user.userName)-*"
This is adding a - to the -Filter after $($user.userName) so correct files are matched
Describe the bug If we have two users with similar usernames there is a chance they will get the other person's certificate. e.g. john john.smith
john will get both his and john.smith's certs but will likely have john.smith's cert installed so will end up with certificate issues
To Reproduce create two similar users that will get and use certificates, e.g. john and john.smith
Expected behavior Each user should only get their certificate and have the correct one installed
Links n/a
Screenshots n/a
System Device (please complete the following information):
Additional context n/a
Possible Working Solution change the following line in Distribute-UserCerts.ps1
$userCertFiles = Get-ChildItem -Path "$JCScriptRoot/UserCerts" -Filter "$($user.userName)*"
to$userCertFiles = Get-ChildItem -Path "$JCScriptRoot/UserCerts" -Filter "$($user.userName)-*"
This is adding a - to the -Filter after $($user.userName) so correct files are matched