Fossil

Check-in [a72a8a80]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:s/guest/nobody/g in login_clear_login_data() query.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | json-multitag-test | json
Files: files | file ages | folders
SHA1:a72a8a80d881d92ffd1d6606de07d9baa4b61535
User & Date: stephan 2011-11-01 02:41:04
Context
2011-11-01
02:45
/json/logout now returns the same as /json/whoami, but with the info for the nobody user, as suggested by Caleb Gray. check-in: 013e8ee7 user: stephan tags: json-multitag-test, json
02:41
s/guest/nobody/g in login_clear_login_data() query. check-in: a72a8a80 user: stephan tags: json-multitag-test, json
02:39
fixed a bug in the AJAX code which caused an invalidated auth token to stick around for too long. check-in: f6debb5c user: stephan tags: json-multitag-test, json
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/login.c.

340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
  }else{
    char const * cookie = login_cookie_name(); 
    /* To logout, change the cookie value to an empty string */
    cgi_set_cookie(cookie, "",
                   login_cookie_path(), -86400);
    db_multi_exec("UPDATE user SET cookie=NULL, ipaddr=NULL, "
                  "  cexpire=0 WHERE uid=%d"
                  "  AND login NOT IN ('anonymous','guest',"
                  "  'developer','reader')", g.userUid);
    cgi_replace_parameter(cookie, NULL)
      /* At the time of this writing, cgi_replace_parameter() was
      ** "NULL-value-safe", and i'm hoping the NULL doesn't cause any
      ** downstream problems here. We could alternately use "" here.
      */
      ;







|







340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
  }else{
    char const * cookie = login_cookie_name(); 
    /* To logout, change the cookie value to an empty string */
    cgi_set_cookie(cookie, "",
                   login_cookie_path(), -86400);
    db_multi_exec("UPDATE user SET cookie=NULL, ipaddr=NULL, "
                  "  cexpire=0 WHERE uid=%d"
                  "  AND login NOT IN ('anonymous','nobody',"
                  "  'developer','reader')", g.userUid);
    cgi_replace_parameter(cookie, NULL)
      /* At the time of this writing, cgi_replace_parameter() was
      ** "NULL-value-safe", and i'm hoping the NULL doesn't cause any
      ** downstream problems here. We could alternately use "" here.
      */
      ;