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

Cap data read in HandlePush handler #1523

Closed
darkdarkdragon opened this issue May 28, 2020 · 1 comment · Fixed by #1827
Closed

Cap data read in HandlePush handler #1523

darkdarkdragon opened this issue May 28, 2020 · 1 comment · Fixed by #1827
Assignees

Comments

@darkdarkdragon
Copy link
Contributor

Currently, HandlePush handler reads incoming request unconditionally, all the way through.

	// we read this unconditionally, mostly for ffmpeg
	body, err := ioutil.ReadAll(r.Body)

That means that bad actor can stream until node will eat up all the memory and will be killed.

We should cap this read at some reasonable amount.

@jailuthra
Copy link
Contributor

In addition to capping the segdata read in PushAPI client <-> B, increasing the scope of this issue to also use the same cap between B <-> O <-> T for the source segment and transcoded renditions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants