Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Login window space characters not being stripped 3.1 #95

Closed
sccmrb opened this issue Jul 18, 2023 · 10 comments
Closed

Login window space characters not being stripped 3.1 #95

sccmrb opened this issue Jul 18, 2023 · 10 comments

Comments

@sccmrb
Copy link

sccmrb commented Jul 18, 2023

In NoMAd login we had an issue where putting in a space character was ignored by the login process but passed onto the Mac as a new user. So "username" and " username" and "username " are both valid with the same password and it creates three separate users. This was a massive headache for us last year with NoMAD Login.

@sccmrb
Copy link
Author

sccmrb commented Jul 20, 2023

Forgot to add, this problem still exists in XCreds 3.1. In the NoMAD login files it was in the UI file that contained the bug for not filtering out space characters.

@sccmrb
Copy link
Author

sccmrb commented Jul 21, 2023

I'm thinking around line 131 of the NoLoMechanism.swift file is the issue in not stripping space characters.

@twocanoes
Copy link
Owner

I'll add in a fix and create a new build

@twocanoes
Copy link
Owner

It was actually in XCredsBaseMechanism. I stripped out whitespace and \0. New build is up:
PreBeta-XCreds_Build-5085_Version-3.2.pkg

@sccmrb
Copy link
Author

sccmrb commented Aug 3, 2023

Ok great, thanks. I will verify tomorrow 8/4 when I'm back on campus.

@sccmrb
Copy link
Author

sccmrb commented Aug 4, 2023

It still appears to still be creating a user but when you attempt to login it just freezes the login screen

@sccmrb
Copy link
Author

sccmrb commented Aug 4, 2023

When looking in the local directory utility on the computer the user that's created has the spaces in it still. In this case we are using a user called "teststudent" but I logged in as " teststudent". Two users now are in the Users section of System Settings but it's not actually creating the home folder. Can we stop the login process if it has a space at all?

@twocanoes
Copy link
Owner

OK, i'l dig into it. I cleaned up the code that stripped the nulls to also strip spaces, but there seems to be more to it.

@twocanoes twocanoes reopened this Aug 4, 2023
@twocanoes
Copy link
Owner

i added additional normallization and hopefully it will resolve the issue. See build PreBeta-XCreds_Build-5087_Version-3.2.pkg

@sccmrb
Copy link
Author

sccmrb commented Aug 11, 2023

Ahh excellent. That seems to have done it. I tired a few users with and without spaces and no new accounts were created. Thank you very much.

twocanoes added a commit that referenced this issue Aug 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants