Mihai RUSU
2004-Aug-06 14:57 UTC
[icecast-dev] icecast 2 auth problem with (old?) ices, MuSe
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi I have recently downloaded icecast 2 (I am an old icecast 1.x user) and tried to use it with my ices 0.2.3 (which works on icecast 1) but fails on login. Also I have tried with MuSe 0.8.1 and same error too. After some digging into the sources I found the problem to be with _check_pass_icy() which receives a "strange" pass to compare with, something like this "SOURCE <password> /<mountpoint>" and it does strcmp on this with the configured pass in icecast.xml which, of course, fails. Now this either is because of some protocol changes you guys did into icecast 2 and im using old version tools , or the calling code of _check_pass_icy() should parse a little more the string before feeding it up to _check_pass_icy(), in any case I did the following dirty/fast patch which works for me(tm): - --- connection.c Fri Dec 12 23:18:20 2003 +++ connection.c.mod Mon Jan 12 17:50:12 2004 @@ -530,12 +530,16 @@ static int _check_pass_icy(http_parser_t *parser, char *correctpass) { char *password; + int tlen; password = httpp_getvar(parser, HTTPP_VAR_ICYPASSWORD); if(!password) return 0; - - if (strcmp(password, correctpass)) + if (strstr(password, "SOURCE ") == password) password += 7; + if (strstr(password, correctpass) != password + || (password[(tlen = strlen(correctpass))] + && strstr(password + tlen, " /") != password + tlen)) return 0; else return 1; <p>- -- Mihai RUSU Email: dizzy@roedu.net GPG : http://dizzy.roedu.net/dizzy-gpg.txt WWW: http://dizzy.roedu.net "Linux is obsolete" -- AST -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFAAsWJPZzOzrZY/1QRAkqDAJ4ypddNyHiCN/mbW1ATPtVJ92qmVgCg009j qN/XD6eKJRb+/j9NngTW4Zc=Zujo -----END PGP SIGNATURE----- --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Michael Smith
2004-Aug-06 14:57 UTC
[icecast-dev] icecast 2 auth problem with (old?) ices, MuSe
On Tuesday 13 January 2004 03:04, Mihai RUSU wrote:> Hi > > I have recently downloaded icecast 2 (I am an old icecast 1.x user) and > tried to use it with my ices 0.2.3 (which works on icecast 1) but fails on > login. Also I have tried with MuSe 0.8.1 and same error too. After some > digging into the sources I found the problem to be with _check_pass_icy() > which receives a "strange" pass to compare with, something like this > "SOURCE <password> /<mountpoint>" and it does strcmp on this with the > configured pass in icecast.xml which, of course, fails. > > Now this either is because of some protocol changes you guys did into > icecast 2 and im using old version tools , or the calling code of > _check_pass_icy() should parse a little more the string before feeding it > up to _check_pass_icy(), in any case I did the following dirty/fast patch > which works for me(tm): >This shouldn't be being passed to _check_pass_icy() at all - this isn't the "icy" (shoutcast nasty ugly) protocol at all. We support that (icy) protocol because it's widely used - but it's a horribly ugly hack to pretend that it's HTTP-like. We're not adding more not-HTTP-but-somewhat-similar protocols. In fact, it's not any of the protocols supported by icecast. The only bug here is that httpp_parse_icy() is accepting this request, so it later gets passed to _check_pass_icy() - but httpp_parse_icy() _should_ do more error checking and reject this entirely. Mike --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Mihai RUSU
2004-Aug-06 14:57 UTC
[icecast-dev] icecast 2 auth problem with (old?) ices, MuSe
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi Michael and thanks for answer! On Tue, 13 Jan 2004, Michael Smith wrote:> This shouldn't be being passed to _check_pass_icy() at all - this isn't the > "icy" (shoutcast nasty ugly) protocol at all. We support that (icy) protocol > because it's widely used - but it's a horribly ugly hack to pretend that it's > HTTP-like. We're not adding more not-HTTP-but-somewhat-similar protocols.Ok, let me get this straight, its a client bug right ? (ie ices, MuSe) In that case I need to update my ices ? (I thought both ices and MuSe use libshout for client-server low-level comunication in which case this libshout would need to be fixed). I will contact MuSe and ices devs if this is the case... Another question, if this is some old/broken protocol, is there a libshout version that supports some protocol to connect as a source to shoutcast, icecast1, icecast2 ? - -- Mihai RUSU Email: dizzy@roedu.net GPG : http://dizzy.roedu.net/dizzy-gpg.txt WWW: http://dizzy.roedu.net "Linux is obsolete" -- AST -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFAA7ZpPZzOzrZY/1QRAoBjAKCyzUj6+i0Fp5Ch97fRkvpRkgNx3ACgghFa OHZ50NDmffkHo7SuH+3JNvA=sWPi -----END PGP SIGNATURE----- --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.