Skip to content

fix(console): validate bucket name characters before submission - #325

Merged
cxymds merged 1 commit into
mainfrom
cxymds/fix/console-bucket-name-validation
Nov 30, 2026
Merged

cxymds merged 1 commit into
mainfrom
cxymds/fix/console-bucket-name-validation

Conversation

@cxymds

@cxymds cxymds commented Nov 30, 2026

Copy link
Copy Markdown
Member

Pull Request

Description

The bucket name in rustfs/rustfs#9805 contains two zero-width spaces (U+200B) after the first letter. The Create Bucket form accepted the input and only showed a generic error after submission.

The shared bucket name validator now checks the allowed character set. The form shows a localized error linked to the name field, disables Create, and excludes the invalid name from permission probes. Correcting the value clears the error and allows creation.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • Performance improvement
  • Test improvements
  • Security fix

Testing

  • Unit tests added/updated
  • Manual testing completed
pnpm install --frozen-lockfile
pnpm type-check
pnpm lint
pnpm format:check
pnpm test:run
git diff --check

All 1,315 tests passed. Chrome reproduced the missing error on main and verified the inline error, disabled Create button, and corrected input on desktop and mobile. The corrected desktop submission returned HTTP 200 against a local RustFS 1.0.0-beta.7 instance.

Checklist

  • Code follows the project's style guidelines
  • Self-review completed
  • TypeScript types are properly defined
  • All commit messages are in English (Conventional Commits)
  • All existing tests pass
  • No new dependencies added, or they are justified

Related Issues

Closes rustfs/rustfs#9805

Screenshots (if applicable)

Both desktop screenshots use the original input with two zero-width spaces.

Before After
Create Bucket dialog with the invalid name and an enabled Create button Create Bucket dialog showing the inline validation error and disabled Create button
Mobile with Chinese localization

Mobile Create Bucket dialog showing a localized validation error

Additional Notes

The existing trim behavior is preserved for surrounding whitespace.

Catch invisible and unsupported characters in the shared bucket name validator so the create form can identify the invalid input before issuing a permission check or S3 request.
@cxymds
cxymds merged commit 78a7f5d into main Nov 30, 2026
10 checks passed
@cxymds
cxymds deleted the cxymds/fix/console-bucket-name-validation branch November 30, 2026 11:04
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

Successfully merging this pull request may close these issues.

Couldn't make new bucket with correct name

1 participant