Skip to content

v1.1.1

Choose a tag to compare

@github-actions github-actions released this 20 Feb 17:10
· 27 commits to main since this release
b9bbc8c

Username Sanitization Enhancement

New Features

  • Implemented new username sanitization functionality to handle invalid characters
  • Added comprehensive validation for usernames to ensure compatibility

Improvements

  • Changed username handling message from "padded" to "sanitized" for better clarity
  • Moved username validation logic to a separate utility package
  • Added support for handling Unicode characters, dots, and special characters

Technical Details

  • Created new username_sanitizer.go utility with the following rules:
    • Validates characters against pattern [a-zA-Z0-9_-]
    • Replaces invalid characters with underscore
    • Maintains minimum length requirement of 6 characters
    • Preserves dashes and existing underscores
  • Added extensive test coverage for username sanitization:
    • Tests for various invalid character cases
    • Length validation tests
    • Regular expression compliance tests

Examples

  • john.doe → john_doe
  • user@123 → user_123
  • użer123 → u_er123
  • Short usernames (e.g. ab) will be padded with underscores to meet minimum length

Full Changelog: v1.1.0...v1.1.1