Error when using Esapi validation

核能气质少年 提交于 2019-12-04 17:55:13

This is happening because the call to validator().getValidInput("PathFile", "C:\\TEMP\\file.txt", "PathFile", 100, false); wraps a call to ESAPI.encoder().canonicalize() that is transforming the input to the char sequence (Not literal String!) C:TEMP'0x0C'ile.txt before it passes to the regex engine.

Except for the second "\" getting converted to the char 0x0c this is normally desired behavior. That could be a bug in ESAPI.

What you want, is to make a call to ESAPI.validator().getValidDirectoryPath()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!