Diff
Not logged in

Differences From:

File src/login.c part of check-in [929d28e358] - Added the "e" capability for viewing ticket submitter email addresses. Additional tinkering toward the design of tickets. This check-in is only thinly tested. by drh on 2007-11-05 02:42:58. [view]

To:

File src/login.c part of check-in [d2b4469934] - Append the pathname to the login cookie name so that separate cookies are used for each server. by drh on 2007-11-21 13:52:26. Also file src/login.c part of check-in [d0305b305a] - Merged mainline into my branch to get the newest application. by aku on 2007-12-05 08:07:46. [view]

@@ -55,9 +55,17 @@
 /*
 ** Return the name of the login cookie
 */
 static char *login_cookie_name(void){
-  return "fossil_login";
+  static char *zCookieName = 0;
+  if( zCookieName==0 ){
+    int n = strlen(g.zTop);
+    zCookieName = malloc( n*2+16 );
+                      /* 0123456789 12345 */
+    strcpy(zCookieName, "fossil_login_");
+    encode16((unsigned char*)g.zTop, (unsigned char*)&zCookieName[13], n);
+  }
+  return zCookieName;
 }
 
 /*
 ** WEBPAGE: /login