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

Users with certain characters in first name couldn't be imported. Weird issue with password field too! #569

Open
nrmn4usm opened this issue Sep 25, 2024 · 3 comments

Comments

@nrmn4usm
Copy link

nrmn4usm commented Sep 25, 2024

First Name containing certain characters
First name containing (.) (@) (') (/). Users with these characters will not be imported.

To Reproduce
Use the following example:
rgtest@tm.my,76898,rgtest@tm.my,Jane@Janet, Doe

Expected behavior
Was not a problem before. In fact, last time, if any users with the first letter as capital letter (first name or last name), no problem too!

When I says last time, I checked, it was when the validation.php file content is like in the attachment. Extracted from our running server.

Error Message
Empty or invalid data provided

Desktop (please complete the following information):

  • OS: Windows 11
  • Your Browser: Chrome
  • daloRADIUS Version: [e.g. "cloned the master branch today on commit hash 566 by @kraman2681"]
  • FreeRADIUS Version: 3
  • Installed using the install.sh - installation was fine on Ubuntu 24.04.1 LTS (x86-64) - thanks for making this @filippolauria

validation.zip

Edit:
For the password field, the problem only occurs when using Import Users. Example of password is like "0123/29". However, if I want to add the user manually, such password could be accepted.

Problem only with the first name field. I tested this for the second time on a freshly installed Ubuntu 24.04.1 LTS (x86-64). It seems that the regex in these field doesn't like (/) - in my country, names with this kind of character is normal, (@) - people with alias, or even dot (.) is also common. Same thing for (-), as well as (') and (`). As you noticed, I highlight only on the first name field. This is because, I didn't test with the last name. In my setup, I use the last name as their type (e.g. "- staff", "- student" etc.); weirdly, the (-) in the last name (for my case) doesn't give any issue.

I have more than thousand users. Currently, I am using the old Daloradius without this issue. It runs without any problem on Raspberry Pi. Now I want to use the latest version of Daloradius which is better (except for the issue that I pointed out here) on a Proxmox Ubuntu VM - a much better hardware. Editing each user with "bad" first name and adding users with "bad" password manually would be a non-smart move.

@nrmn4usm nrmn4usm changed the title Users with certain characters in name and password couldn't be imported Users with certain characters in name couldn't be imported Oct 5, 2024
@nrmn4usm nrmn4usm changed the title Users with certain characters in name couldn't be imported Users with certain characters in first and last name couldn't be imported Oct 5, 2024
@nrmn4usm nrmn4usm changed the title Users with certain characters in first and last name couldn't be imported Users with certain characters in first name couldn't be imported. Weird issue with password field too! Oct 5, 2024
@nrmn4usm
Copy link
Author

nrmn4usm commented Oct 6, 2024

I retried (again with a freshly installed Ubuntu) for the password, using the Import Users, it looks like (@) is fine. It hates (/), ('), (`).

@nrmn4usm
Copy link
Author

nrmn4usm commented Oct 16, 2024

Sample errors.csv

Attached is an example of .csv file to be imported through Import Users.

Here is the content:
joe@usa.bb,985471254789,joe@usa.bb,John Doe, - STAFF
mza@usa.bb,123456789528,mza@usa.bb,Mohd. Zaid, - STAFF
jane@usa.bb,012547965327,jane@usa.bb,Jane Doe, - STAFF
jack@usa.bb,489632101458,jack@usa.bb,Jack White, - STAFF
kevin@usa.bb,026979502549,kevin@usa.bb,Kevin@Calvin, - STAFF
kermit@usa.bb,7778896654125,kermit@usa.bb,Kermit Paulie, - STAFF
julia@usa.bb,12345/215871,julia@usa.bb,Julia Andy, - STAFF

Users from Line 1, 3, 4 and 6 can be imported without any issue.

Users from Line 2, 5 and 7 are omitted.
Users from Line 2 and 5 are omitted due to the (.) and (@). Of course if I remove the (.) and (@), they can be imported w/o any issue.
User from line 7 are omitted due to the password (/). If I remove the (/), it can be imported.

However, the user from line 7 can be added through the menu New User even with (/) without any issue.

@nrmn4usm
Copy link
Author

nrmn4usm commented Nov 16, 2024

For the problems described above, I decided to clean-up my users' first name. Its just Excel. But for the password field problem, I couldn't add my users manually. There are hundreds of them. And they are my current users, they are already using the accounts (username and password); not new users.

For the clear-text password problem when using "Import Users" feature (.csv files), besides the character (/), the current version also doesn't accept (-). Example: julia@usa.bb,12-345/215871,julia@usa.bb,Julia Andy, - STAFF

However, when using "New User" or "New User - Quick Add", when I enter the details manually, it is fine, without any problem - even if the password contains (-) and/or (/).

As I said, I couldn't add my users with the clear-text password with (-) and (/) manually. There are hundreds of them. And I think this is my 5th/6th attempt of installing Daloradius, each were on a freshly installed Ubuntu 24.04.1 LTS.

Really need your help. Please.

@filippolauria , @kraman2681 @lirantal

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

1 participant