Author: jwilcox
Date: 2006-09-18 20:24:31 -0400 (Mon, 18 Sep 2006)
New Revision: 65617

Modified:
   trunk/daap-sharp/ChangeLog
   trunk/daap-sharp/src/Server.cs
Log:
2006-09-18  James Willcox  <[EMAIL PROTECTED]>

        * src/Server.cs: only password protect the /login path
        iTunes only passes the HTTP password there, and assumes the
        session id is good enough after that.



Modified: trunk/daap-sharp/ChangeLog
===================================================================
--- trunk/daap-sharp/ChangeLog  2006-09-19 00:23:22 UTC (rev 65616)
+++ trunk/daap-sharp/ChangeLog  2006-09-19 00:24:31 UTC (rev 65617)
@@ -1,3 +1,9 @@
+2006-09-18  James Willcox  <[EMAIL PROTECTED]>
+
+       * src/Server.cs: only password protect the /login path
+       iTunes only passes the HTTP password there, and assumes the
+       session id is good enough after that.
+
 2006-08-06  James Willcox  <[EMAIL PROTECTED]>
 
        * src/Server.cs: when opening tracks for streaming, use FileAccess.Read

Modified: trunk/daap-sharp/src/Server.cs
===================================================================
--- trunk/daap-sharp/src/Server.cs      2006-09-19 00:23:22 UTC (rev 65616)
+++ trunk/daap-sharp/src/Server.cs      2006-09-19 00:24:31 UTC (rev 65617)
@@ -290,7 +290,7 @@
                             }
                         }
 
-                        if (authMethod != AuthenticationMethod.None && 
uri.AbsolutePath != "/server-info" &&
+                        if (authMethod != AuthenticationMethod.None && 
uri.AbsolutePath == "/login" &&
                             !IsValidAuth (user, password)) {
                             WriteAccessDenied (client);
                             return true;
@@ -679,7 +679,7 @@
                 session = Int32.Parse (query["session-id"]);
             }
 
-            if (session == 0 && path != "/server-info" && path != 
"/content-codes" &&
+            if (!sessions.Contains (session) && path != "/server-info" && path 
!= "/content-codes" &&
                 path != "/login") {
                 ws.WriteResponse (client, HttpStatusCode.Forbidden, "invalid 
session id");
                 return true;

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to