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

Replace mandatory extension with validation #32

Merged
merged 2 commits into from
Jul 14, 2021

Conversation

fgsch
Copy link
Member

@fgsch fgsch commented Jul 13, 2021

Rather than restricting the extension to .wasm and later failing when loading the file, accept any file but validate its content.

As a bonus, disambiguate OS specific errors (e.g., file does not exist) from invalid format.

Fixes #2.

@fgsch fgsch force-pushed the remove-ext-restriction branch from 15ef9a6 to 3178b71 Compare July 13, 2021 15:05
@cratelyn cratelyn requested a review from aturon July 13, 2021 16:16
fgsch added 2 commits July 13, 2021 23:19
Rather than restricting the extension to .wasm and later failing
when loading the file, accept any file but validate its content.

As a bonus, disambiguate OS specific errors (e.g., file does not
exist) from invalid format.

Fixes fastly#2.
@fgsch fgsch force-pushed the remove-ext-restriction branch from 3178b71 to e98ddd5 Compare July 13, 2021 22:23
Copy link
Contributor

@aturon aturon left a comment

Choose a reason for hiding this comment

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

This is awesome, thank you! 💯

@fgsch fgsch merged commit bf88937 into fastly:main Jul 14, 2021
@fgsch fgsch deleted the remove-ext-restriction branch July 14, 2021 18:11
@cratelyn cratelyn added the feature-ux Concerning ergonomics and ease-of-use label Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-ux Concerning ergonomics and ease-of-use
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove restriction on .wasm extension
3 participants