mirror of
https://github.com/abbas-gheydi/radotp.git
synced 2026-04-26 11:35:51 +03:00
[GH-ISSUE #8] Username normalisation #5
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/radotp#5
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @karelvins on GitHub (Feb 12, 2024).
Original GitHub issue: https://github.com/abbas-gheydi/radotp/issues/8
Hello, it would be nice to have an option for username "normalisation":
Thank you.
Karel
@abbas-gheydi commented on GitHub (Feb 12, 2024):
Hi Karel,
Thanks for bringing this up! Just wanted to let you know that the latest release, version 2.1.0, addresses those issues.
Here's what's changed:
Case Sensitivity Handling: Usernames are now uniformly processed in lowercase, so no need to worry about case sensitivity causing any hiccups.
Domain Stripping: Users can input their usernames with or without domain prefixes (e.g., domain\username or username@domain.com), and the system will intelligently strip out the unnecessary parts.
These improvements are aimed at enhancing the user experience and streamlining the authentication process. If you have any further feedback or encounter any issues, feel free to reach out.
Thanks again for your input!
@karelvins commented on GitHub (Feb 12, 2024):
There could be some problem with the domain\username handling. Case sensitivity is OK, @doman striping works OK, but domain\username:
radotp-1 | 2024/02/12 21:55:26 received a radius packet for user: domain\karel.vins
radotp-1 |
radotp-1 | 2024/02/12 21:55:26 /pkgs/storage/postgres_otp.go:112 record not found
radotp-1 | [0.596ms] [rows:0] SELECT * FROM "otps" WHERE Username = 'domain' ORDER BY "otps"."id" LIMIT 1
radotp-1 | 2024/02/12 21:55:26 Access-Reject to XXXXXXXX:29480 for domain\karel.vins stage otp
It will take domain instead of username...
Thank you
Karel
@karelvins commented on GitHub (Feb 12, 2024):
Maybe here:
func (p postgresOtp) Get(username string) (password string, err error) {
username = strings.ToLower(username)
if strings.Contains(username, "\") {
splitChar := "\"
username = strings.Split(username, splitChar)[0] <------------------- should be [1] ?
@abbas-gheydi commented on GitHub (Feb 13, 2024):
The issue with pre-Windows 2000 logon for usernames has been resolved in version 2.1.1.
Thanks to the contributor who raised the issue – your input is invaluable in improving the project.
If you encounter any further issues, feel free to report them. Your feedback helps me maintain the quality of the project.
Thank you
Abbas
@karelvins commented on GitHub (Feb 13, 2024):
Thank you, 2.1.1 is working fine.