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

CODE | Validate path scheme in getBucketIds #22

Open
sevenbitbyte opened this issue Feb 24, 2020 · 0 comments
Open

CODE | Validate path scheme in getBucketIds #22

sevenbitbyte opened this issue Feb 24, 2020 · 0 comments

Comments

@sevenbitbyte
Copy link
Member

🤖 Code Proposal

Improve gpgfs.getBucketIds() to be more robust and fully filter for valid bucket directories.

Verify:

  1. Path contains a valid bucket id
  2. Path is a directory

gpgfs/src/gpgfs.js

Lines 212 to 220 in fe51f8b

async getBucketIds(){
const bucketPaths = (await this.readDir('/buckets'))
.map(item=>{
return item.replace('bucket-','')
})
debug('found ids', bucketPaths)
return bucketPaths
}

Motivation

@sevenbitbyte sevenbitbyte changed the title CODE | CODE | Validate path scheme in getBucketIds Feb 24, 2020
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

No branches or pull requests

1 participant