-
Notifications
You must be signed in to change notification settings - Fork 44
Apparent buffer overrun affecting the Request object passed to the function #142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Thanks @daniel-rocha, @dahatake has been investigating this issue recently too. It comes from a bug in code generated by protobuf.js. We're currently working on the fix, but in the meantime could you try checking Do you also know which version this was working for you? Is this a recent regression? |
@mhoeger are we targeting Sprint 37 for this? If so, can we assign to the sprint? |
The root cause of this issue is that we use a "map" in our protobuf file. From the protocol buffers docs:
In combination with protobuf.js, this results in generated code that overflows.
|
This specific concern will be addressed in Azure/azure-functions-host#3789. A longer-term fix for valid empty values in a mapping will be addressed here: Azure/azure-functions-language-worker-protobuf#21 |
Suppose a function requires a query string parameter, like “productId”. Previously, if either the key wasn’t present in the query string, or if the value was null, the corresponding req. in node would be null, and we could do validation on it to decide how to proceed with the function.
Investigative information
Please provide the following:
Repro steps
Provide the steps required to reproduce the problem:
Expected behavior
Provide a description of the expected behavior.
req.query.productId should be null or undefined.
Actual behavior
req.query.productId is full of garbage, including the entire header of the HTTP request:
`ser-agent�rMozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36��
�upgrade-insecure-requests��1�>
�x-waws-unencoded-url�&/api/NodeRequestBugFunction?productId=�!
�is-service-tunneled��0�4
x-arr-log-id�$37c75121-e24c-4afb-8eb2-8d0af7bc3fdb�6
�disguised-host�$noderequestbugtest.azurewebsites.net�*
�x-site-deployment-id��NodeRequestBugTest�<
�was-default-hostname�$noderequestbugtest.azurewebsites.net�8
�x-original-url�&/api/NodeRequestBugFunction?productId=�&
�x-forwarded-for��167.220.255.10:2412���
�x-forwarded-proto��httpsz�`
Known workarounds
No known workarounds, which is important because prevents validation of query string parameters.
Related information
Provide any related information
The text was updated successfully, but these errors were encountered: