fix: accept underscores and hyphens in usernames - #10334
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Hey @tomatotomata! 👋Thanks for submitting your first pull request to the Armbian project — we're excited to have you contributing! 🧡 If you'd like to stay informed about project updates or collaborate more closely with the team, Also, don’t forget to ⭐ star the repo if you haven’t already — and welcome aboard! 🚀 |
What changed
Fix the username handling used by
armbian-firstloginso names such asarmbian_userandarmbian-userare accepted consistently with the issue report in armbian/configng#961.The validation pattern now permits
_and-after the initial letter, and the normalization step preserves those characters instead of silently removing them beforeuseraddruns. Names must still start with a letter and remain limited to ASCII letters, digits,_, and-.The related report is in the
armbian/configngtracker, but the affected script is maintained in this repository underpackages/bsp/common/usr/lib/armbian/armbian-firstlogin.Validation
bash -non the script after removing the repository file's existing CRLF line endingsarmbian_user,armbian-user, andUser_2_armbianandarmbian.usergit diff --checkThe separate Imager-side validation mentioned in the report is intentionally out of scope for this focused build-side fix.