ValidationException: addHeader: Invalid input #797
Replies: 1 comment 2 replies
-
Not an answer, but it would be very helpful if you could show us the ESAPI code and the immediate surrounding context that caused this or even better a short JUnit test to reproduce it. From the looks of it, I'd say you are calling (possibly not directly) , you are calling this addHeader method and line 275 is throwing a
looks incorrect here as it would only allow a single character for a header value. Here's what it is supposed to be based on our default 2.5.2.0 ESAPI.properties file:
So I think what is triggering this is that the '*' missing before the ending '$' character on the regex. |
Beta Was this translation helpful? Give feedback.
-
Hello I have upgraded ESAPI libraries from 2.1 to 2.5.2 version and I am getting the following error in the new version which was working in the old version.Any help is appreciated.
Invalid input: context=addHeader, type(HTTPHeaderValue)=^[a-zA-Z0-9()-=*.?;,+/:&_ ]$, input=attachment;filename="CstmUpdFile-I_3.3.3
647_20230822213220.ZIP"
org.owasp.esapi.errors.ValidationException: addHeader: Invalid input. Please conform to regex ^[a-zA-Z0-9()-=*.?;,+
/:&_ ]$ with a maximum length of 4096
Beta Was this translation helpful? Give feedback.
All reactions