[icecast-dev] icecast 2 auth problem with (old?) ices, MuSe
Mihai RUSU
dizzy at roedu.net
Mon Jan 12 08:04:22 PST 2004
-----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 at 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 at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Icecast-dev
mailing list