Skip to content

fix(paths): add path verification #31

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

Merged
merged 1 commit into from
Apr 22, 2020
Merged

Conversation

dkundel
Copy link
Contributor

@dkundel dkundel commented Apr 22, 2020

Adds checks for:

  • shorter than 256 characters
  • none of the following characters ;,?:@+&$()' "
  • starts with a /

Contributing to Twilio

All third-party contributors acknowledge that any contributions they provide will be made under the same open-source license that the open-source project is provided under.

  • I acknowledge that all my contributions will be made under the project's license.

Copy link
Contributor

@philnash philnash left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me. And yay for the first of the tests!

Are the only invalid characters [;,?:@+&$()' ? Could you, for example, use an emoji in a path?

@dkundel dkundel merged commit ea1a660 into master Apr 22, 2020
@dkundel dkundel deleted the dkundel/path-verification branch April 22, 2020 22:26
@dkundel
Copy link
Contributor Author

dkundel commented Apr 22, 2020

I merged this for now to ship it but I created a follow up issue for the emoji situation. It might just mean that when we create the paths from filenames we have to convert those into escaped characters using the URL class

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.

2 participants