FIX: Improve protection against problematic usernames (PR #8097)

GitHub

You’ve signed the CLA, romanrizzi. Thank you! This pull request is ready for review.

Looks good to me!