-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugBug or defectBug or defect
Milestone
Description
Context
- node version: 10
- joi version: 13.7.0
- environment (node, browser): node
- 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
const Joi = require('joi');
const schema = 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect