frozen-bubble
frozen-bubble copied to clipboard
.
.
It does not fix the problem for me. I applied this patch:
diff -ru frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd.ori/server/net.c_tmp frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd/server/net.c_tmp
--- frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd.ori/server/net.c_tmp 2020-10-03 16:54:45.435173567 +0200
+++ frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd/server/net.c_tmp 2019-01-09 22:32:04.000000000 +0100
@@ -988,8 +988,8 @@
}
uname(&uname_);
- user_agent = asprintf_("Frozen-Bubble server version " VERSION " (protocol version %d.%d) on %s/%s\n", proto_major, proto_minor, uname_.sysname, uname_.machine);
- buf = asprintf_("GET %s HTTP/0.9\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n", path, host, user_agent);
+ user_agent = asprintf_("Frozen-Bubble server version " VERSION " (protocol version %d.%d) on %s/%s", proto_major, proto_minor, uname_.sysname, uname_.machine);
+ buf = asprintf_("GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n", path, host, user_agent);
free(user_agent);
if (write(sock, buf, strlen(buf)) != strlen(buf)) {
close(sock);
And here is the result:
$ sudo -u fbubble fb-server -z -n "yugiohjcj.cf" &
$ sudo tail /var/log/syslog
Oct 3 17:25:05 server fb-server[TCP1511][29522]: ERROR HTTP_GET: bad server response 400 retrieving http://www.frozen-bubble.org:80/servers/servers.php?server-remove=DISTANT_END&server-remove-port=1511
Oct 3 17:26:11 server fb-server[TCP1511][21180]: ERROR HTTP_GET: bad server response 400 retrieving http://www.frozen-bubble.org:80/servers/blacklisted_IPs
Oct 3 17:26:11 server fb-server[TCP1511][21179]: ERROR HTTP_GET: bad server response 400 retrieving http://www.frozen-bubble.org:80/servers/servers.php?server-add=DISTANT_END&server-add-port=1511
Is it really supposed to fix this bug?
I applied this patch that is doing a printf
:
diff -ruN frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd.ori/server/net.c_tmp frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd/server/net.c_tmp
--- frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd.ori/server/net.c_tmp2014-05-01 20:09:48.000000000 +0200
+++ frozen-bubble-8d81dd2a1421a86619eb2ff438053733bcf58fcd/server/net.c_tmp 2020-10-12 06:44:41.691533095 +0200
@@ -988,8 +988,9 @@
}
uname(&uname_);
- user_agent = asprintf_("Frozen-Bubble server version " VERSION " (protocol version %d.%d) on %s/%s\n", proto_major, proto_minor, uname_.sysname, uname_.machine);
- buf = asprintf_("GET %s HTTP/0.9\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n", path, host, user_agent);
+ user_agent = asprintf_("Frozen-Bubble server version " VERSION " (protocol version %d.%d) on %s/%s", proto_major, proto_minor, uname_.sysname, uname_.machine);
+ buf = asprintf_("GET %s HTTP/1.1\r\nHost: %s\r\nUser-Agent: %s\r\n\r\n", path, host, user_agent);
+ printf("---\nbuf = %s\n---\n", buf);
free(user_agent);
if (write(sock, buf, strlen(buf)) != strlen(buf)) {
close(sock);
And here is the result:
$ sudo -u fbubble fb-server -z -n "yugiohjcj.cf"
Frozen-Bubble server version 2.213 (protocol version 1.2)
Copyright (c) 2004-2012 Guillaume Cottenceau.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
-z: no preferred language for users of the server
-n: setting servername to 'yugiohjcj.cf'
Entering daemon mode.
---
buf = GET /servers/servers.php?server-add=DISTANT_END&server-add-port=1511 HTTP/1.1
Host: www.frozen-bubble.org
User-Agent: Frozen-Bubble server version 2.213 (protocol version 1.2) on Linux/i686
---
$ sudo tail /var/log/syslog
Oct 12 07:08:29 server fb-server[TCP1511][19442]: ERROR HTTP_GET: bad server response 500 retrieving http://www.frozen-bubble.org:80/servers/servers.php?server-add=DISTANT_END&server-add-port=1511
Oct 12 07:08:30 server fb-server[TCP1511][19443]: ERROR HTTP_GET: bad server response 400 retrieving http://www.frozen-bubble.org:80/servers/blacklisted_IPs
The full HTTP request is now printed. The error is still there.