You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
used with (hapi, standalone, ...): standalone Fuzzing
What are you trying to achieve or the steps to reproduce ?
When running through random generated examples on Joi I noticed the following will fail validation
constJoi=require('joi');constschema=Joi.string().dataUri();console.log('text/x-script.phyton',schema.validate('data:text/x-script.phyton;charset=utf-8,some test here'));console.log('text/x-script',schema.validate('data:text/x-script;charset=utf-8,some test here'));console.log('text/script',schema.validate('data:text/script;charset=utf-8,some test here'));
Which result you had ?
Both text/x-script and text/x-script.phyton fail to be parsed as valid mime types and validation failed
What did you expect ?
since all mime types used are valid ones I expect all validations to pass.
Not sure if this is a major issue since it's probably never used and it might be better to only allow very simple mime types. But it might make sense to mention this limitation in the documentation
The text was updated successfully, but these errors were encountered:
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Context
What are you trying to achieve or the steps to reproduce ?
When running through random generated examples on Joi I noticed the following will fail validation
Which result you had ?
Both
text/x-script
andtext/x-script.phyton
fail to be parsed as valid mime types and validation failedWhat did you expect ?
since all mime types used are valid ones I expect all validations to pass.
Not sure if this is a major issue since it's probably never used and it might be better to only allow very simple mime types. But it might make sense to mention this limitation in the documentation
The text was updated successfully, but these errors were encountered: