You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the whitespace after the semicolon is optional (and the pattern expects a whitespace). If the whitespace is not there, the field boundary is nil and parsing of the request will fail.
E.g. in when using Kong 0.8.3 with Oauth2 and a multipart upload, this fails as following:
share/lua/5.1/multipart.lua: in function 'decode'
share/lua/5.1/multipart.lua:112: in function 'Multipart'
share/lua/5.1/kong/plugins/oauth2/access.lua:93: in function 'retrieve_parameters'
share/lua/5.1/kong/plugins/oauth2/access.lua:359: in function 'parse_access_token'
share/lua/5.1/kong/plugins/oauth2/access.lua:412: in function 'execute'
share/lua/5.1/kong/plugins/oauth2/handler.lua:12: in function 'access'
share/lua/5.1/kong.lua:188: in function 'access'```
Solution: in multipart.lua:109 the value of boundary should also be found, if no whitespace is sent after the ; by the client in the value of the header Content-Type
The text was updated successfully, but these errors were encountered:
in function MultipartData.new(data, content_type), the boundary is searched by using the expression ";%s+boundary=(%S+)".
This works correctly for e.g. this Content-Type header:
Content-Type: multipart/form-data; boundary=AAAH...
But the whitespace after the semicolon is optional (and the pattern expects a whitespace). If the whitespace is not there, the field boundary is nil and parsing of the request will fail.
E.g. in when using Kong 0.8.3 with Oauth2 and a multipart upload, this fails as following:
The text was updated successfully, but these errors were encountered: