-
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: v10.15.0
- joi version: v14.0.0
- environment (node, browser): node
- used with (hapi, standalone, ...): standalone
- any other relevant information:
What are you trying to achieve or the steps to reproduce ?
const schema = Joi.string().base64()
const length = 4473955
let data = 'ACAgICAgICApXG4gICAgICAgICDcDdAgICAgIClXbi'
while (data.length < length) {
data += 'ACAgICAgICApXG4gICAgICAgICDcDdAgICAgIClXbi'
}
data = data.substring(0, length)
const buffer = Buffer.from(data)
const value = buffer.toString('base64')Which result you had ?
RangeError: Maximum call stack size exceeded
What did you expect ?
const { error } = Joi.validate(value, schema) // NO error should be here
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect