Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid bucket name not conform with AWS terminology #7389

Closed
zorino opened this issue Mar 18, 2019 · 3 comments
Closed

invalid bucket name not conform with AWS terminology #7389

zorino opened this issue Mar 18, 2019 · 3 comments

Comments

@zorino
Copy link

zorino commented Mar 18, 2019

Bucket name can only contains a-z 0-9 and '-'.

Expected Behavior

Bucket name with safe characters from https://docs.aws.amazon.com/AmazonS3/latest/dev/UsingMetadata.html
should be supported.

Current Behavior

Bucket name with characters other than a-z 0-9 and '-' are not supported.

case (piece[i] >= 'a' && piece[i] <= 'z' ||
piece[i] == '-'):
// Found a non-digit character, so
// this piece is not a number.
isNotNumber = true
case piece[i] >= '0' && piece[i] <= '9':
// Nothing to do.
default:
// Found invalid character.
return false
}

Possible Solution

Add more valid characters here :

case (piece[i] >= 'a' && piece[i] <= 'z' ||
piece[i] == '-'):
// Found a non-digit character, so
// this piece is not a number.
isNotNumber = true
case piece[i] >= '0' && piece[i] <= '9':
// Nothing to do.
default:
// Found invalid character.
return false
}

Steps to Reproduce (for bugs)

  1. launch minio with a bucket name with an underscore
  2. mount the bucket with s3fs
  3. try to read a file
  4. get invalid bucket name

Context

Regression

Your Environment

@kannappanr
Copy link
Contributor

@zorino Please look at https://docs.aws.amazon.com/AmazonS3/latest/dev/BucketRestrictions.html for bucketnaming restrictions. _ is not an allowed character.

@zorino
Copy link
Author

zorino commented Mar 19, 2019

You're right I was looking at the object name instead of bucket name my bad.

@zorino zorino closed this as completed Mar 19, 2019
@lock
Copy link

lock bot commented Apr 19, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants