igrigorik / em-http-request

Asynchronous HTTP Client (EventMachine + Ruby)
1.22k stars 220 forks source link

Prevent header injection attacks #366

Open c960657 opened 1 month ago

c960657 commented 1 month ago

Add a safeguard against header injection attacks.

There is no bug in em-http-request as such, but this patch removes an attack vector when the library is used to fetch user-provided URLs which have not been properly validated.

This suggestion is inspired by true events.