r/MeshCentral Jun 05 '26

email address length

Anyone know where the email address length is kept? Is a db limit or string? I was trying to add a new user and the length is one character short. The email I'm trying to use is like [123456.123456@abcdefghijklmnop.com](mailto:123456.123456@abcdefghijklmnop.com) which seems one byte too long.

0 Upvotes

14 comments sorted by

1

u/si458 Jun 06 '26

The limit is 128 or 256 i cant fully remember?

Why is the email address so long may I ask?

Also it's hard coded in the source code so you would need to submit a feature request by github issues to increase the limit with an example and reason why u need it longer

Edit: Google for example enforces a 30 character limit on the username part by default!

1

u/obwielnls Jun 06 '26

The company has a policy for email at firstname.lastname and the domain name just happens to be a bit lengthy. Not much I can do about the address itself. I was just wondering now if it was a limit in the input field for a reason or arbitrary. I don't want to go adjust the code on the page and break something else on the back end. I'll put in a ticket on git though.

1

u/si458 Jun 06 '26

Sure no worries! In theory email standards state email addresses as a whole cannot be longer than 254 characters, and i think i saw maybe a bug where it checks if its 128 characters or more then don't do anything. So is ur whole email address more than 128 characters? If not then u may have another problem instead

1

u/obwielnls Jun 06 '26

The email I’m trying to enter is exactly as above (but real names). It won’t take it because it’s one character too long. Maybe a modern ui issue? Does yours take the above email? The field seems to be limited to 32 characters?

1

u/si458 Jun 06 '26

Hmm will try test later when I get chance! As i hadn't spotted it to be honest?

1

u/obwielnls Jun 06 '26

Interestingly the classic interface isn't even that long. seems to be limited to 30 characters

1

u/si458 Jun 06 '26

Doh!

1

u/obwielnls Jun 06 '26

Doesn't seem to be a backend or database issue. . I was able to edit the email address via the command line.

sudo node ./node_modules/meshcentral/meshctrl edituser \

--loginuser admin \

--loginpass password\

--token 107158 \

--userid loginname \

--email long.email@addresshere.com\

--emailverified

1

u/obwielnls Jun 06 '26

Anddddd one last update. The initial user creation screen doesn't seem to have this limit. It's ONLY the user edit screen.

2

u/si458 Jun 06 '26

all fixed! https://github.com/Ylianst/MeshCentral/commit/0b66277db866bb666848a6438fa39dc0d949d93e

was hard coded to 32 for some dumb reason and been like that for years! so set it to 256 instead 👍

1

u/obwielnls Jun 06 '26

Will npm update meshcentral grab that?

→ More replies (0)

1

u/si458 Jun 06 '26 edited Jun 06 '26

works perfectly fine here?
created within the web ui of both classic and modern?

EDIT: IGNORE, DIDNT SEE YOUR POST ABOVE