[xiph-commits] r7693 - icecast/branches/kh/icecast/src

karl at motherfish-iii.xiph.org karl at motherfish-iii.xiph.org
Fri Sep 3 15:42:21 PDT 2004


Author: karl
Date: 2004-09-03 15:42:21 -0700 (Fri, 03 Sep 2004)
New Revision: 7693

Modified:
   icecast/branches/kh/icecast/src/connection.c
   icecast/branches/kh/icecast/src/slave.c
Log:
add small checks for mountpoint names


Modified: icecast/branches/kh/icecast/src/connection.c
===================================================================
--- icecast/branches/kh/icecast/src/connection.c	2004-09-03 13:46:45 UTC (rev 7692)
+++ icecast/branches/kh/icecast/src/connection.c	2004-09-03 22:42:21 UTC (rev 7693)
@@ -653,6 +653,12 @@
 
     INFO1("Source logging in at mountpoint \"%s\"", uri);
 
+    if (uri[0] != '/')
+    {
+        WARN0 ("source mountpoint not starting with /");
+        client_send_401 (client);
+        return;
+    }
     if (!connection_check_source_pass(parser, uri))
     {
         /* We commonly get this if the source client is using the wrong

Modified: icecast/branches/kh/icecast/src/slave.c
===================================================================
--- icecast/branches/kh/icecast/src/slave.c	2004-09-03 13:46:45 UTC (rev 7692)
+++ icecast/branches/kh/icecast/src/slave.c	2004-09-03 22:42:21 UTC (rev 7693)
@@ -327,6 +327,12 @@
 {
     if (relay->source == NULL)
     {
+        if (relay->localmount[0] != '/')
+        {
+            WARN1 ("relay mountpoint \"%s\" does not start with /",
+                    relay->localmount);
+            return;
+        }
         /* new relay, reserve the name */
         relay->source = source_reserve (relay->localmount);
         if (relay->source)



More information about the commits mailing list