MrLetsplay2003 / ShittyAuthServer

Host your own (shitty) authentication server for Minecraft using the Yggdrasil authentication scheme
12 stars 5 forks source link

Client crash because Server sends content length greater 0 in 204 response when using gzip or deflate #6

Closed x0rp01s0n closed 1 year ago

x0rp01s0n commented 1 year ago

When using gzip compression, the auth server appends a "Content-Length" header with a value of 20 to the "204 No Content Response." it causes the shittyauthclient to crash.

test curl command: curl -X POST -d '{"accessToken":"52345234-b345f-4333-3330-e56fztuihjf","clientToken":"4fghfhsdrf-c9c5-44tr1-brgb-0rg5667dr445dfc"}' 'http://test.test/validate' -v -H "accept-encoding: gzip" will retrurn a content length of 20

When requests are made through proxies, the traffic can potentially be compressed using standard HTTP compression methods such as gzip or deflate. However, if the server appends a content-length header to a 204 response, it can cause a client crash.

MrLetsplay2003 commented 1 year ago

I'll take a look at it, thank you for reporting the issue :+1:

MrLetsplay2003 commented 1 year ago

This issue should be fixed in the newest version

MrLetsplay2003 commented 1 year ago

Closing the issue. Feel free to create a new issue if the problem still exists.