Skip to content
代码片段 群组 项目
提交 fc10f84f 编辑于 作者: Bharat Dandu's avatar Bharat Dandu 提交者: Bharat Raju
浏览文件

Adding string length validation check to the zap UI to warn the user when the...

Adding string length validation check to the zap UI to warn the user when the values exceed the allowed length of the string
Github: ZAP#379
上级 0c5c8a7b
No related branches found
No related tags found
无相关合并请求
......@@ -87,6 +87,17 @@ function validateSpecificAttribute(endpointAttribute, attribute) {
if (!checkAttributeBoundsInteger(attribute, endpointAttribute))
defaultAttributeIssues.push('Out of range')
}
} else if (types.isString(attribute.type)) {
let maxLengthForString =
attribute.type == 'char_string' || attribute.type == 'octet_string'
? 255
: 65536
let maxAllowedLength = attribute.maxLength
? attribute.maxLength
: maxLengthForString
if (endpointAttribute.defaultValue.length > maxAllowedLength) {
defaultAttributeIssues.push('String length out of range')
}
}
return { defaultValue: defaultAttributeIssues }
}
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册