Skip to content
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

Header overflow on Node Functions #6550

Closed
luthv opened this issue Aug 22, 2020 · 5 comments
Closed

Header overflow on Node Functions #6550

luthv opened this issue Aug 22, 2020 · 5 comments

Comments

@luthv
Copy link

luthv commented Aug 22, 2020

Is your question related to a specific version? If so, please specify:

Node v12

What language does your question apply to? (e.g. C#, JavaScript, Java, All)

JavaScript

Question

I have a function that makes an API call to a third party service but unfortunately got this error "Parse Error: Header overflow" on each call due to the response headers size is larger than 8K.
Is there anyway we can increase the limit of the response header size for Node js functions?

@v-anvari
Copy link

Hi @luthv , To understand the issue better, we would require additional information from your end.

Kindly, specify the repro steps and can you share the name of function app, time stamp & region as mentioned in the issue template.

Also, please confirm if the error is coming from the third party tool that you are using?

If my understanding is right from the given information, this issue is related to #8656. Please refer to the issue and change the variables as mentioned in #8656, if that helps.

@anthonychu
Copy link
Member

I think to solve this we have to specify --max-http-header-size when starting the node worker. We would need to investigate whether there are any performance or security implications to doing this (Node reduced this value because of potential DoS attacks).

@mhoeger

https://nvd.nist.gov/vuln/detail/CVE-2018-12121
nodejs/node#24692

@ghost ghost added the no-recent-activity label Sep 4, 2020
@ghost
Copy link

ghost commented Sep 4, 2020

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment.

@ghost ghost closed this as completed Sep 7, 2020
@anthonychu
Copy link
Member

@mhoeger Looks like we can set an environment variable languageWorkers__node__arguments with the value of something like --max-http-header-size 20000 and this passes the flag to Node when starting the worker locally. Do you know if this has any effect when deployed to Azure?

@luthv Do you have an example of an API call that returns headers > 8KB that we can test this with?

@ghost ghost removed the no-recent-activity label Sep 7, 2020
@luthv
Copy link
Author

luthv commented Sep 8, 2020

Unfortunately not anymore, it was a WordPress woocommerce server and the offending plugin was the NicePay plugin which for some reason use the headers for error messages about configuration problem.
I contacted the web developer and have them fix the config from their side.

@ghost ghost locked as resolved and limited conversation to collaborators Oct 8, 2020
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants