
v0.39: Grademe is back in your terminal.
Try the CLI betaReturn how many heartbeat bytes are safe to echo: honor the request only when it fits in what was actually received.
April 2014. Heartbleed. OpenSSL's heartbeat let a client say how many bytes to echo back, and the server believed it, no questions asked. Ask for 64 kilobytes while sending almost nothing, and the reply came back padded with whatever was next in the server's memory: private keys, passwords, session cookies. Around half a million trusted web servers were exposed. The whole disaster was one missing check. Add it.
bytes_to_echo(3, 64)Expected result
3For your own tracking. Tests grade your code.
bytes_to_echo(65535, 64)Expected result
0bytes_to_echo(64, 64)Expected result
64Expected files
heartbeat.cAllowed functions
None. Write every helper yourself.
