185dbcc2ba84d6eb1301163b926ebed3177cd379 angie Thu May 19 04:42:20 2016 -0700 Several revisions to login cookie-checking after helpful code review by Max: Use /dev/urandom instead of srand(clock1000()), duh. Instead of forming cookie strings in both wikiLink.c and hgLogin.c, form them all in wikiLink.c so they're consistent. The wikiLink routines now return (possibly empty) slName lists of cookie strings to be set. The login system uses new cookie names that default to a concatentation of central.cookie (which needs to have one name per central database, like hguid for RR hgcentral and hguid.genome-test for hgcentraltest) and either optional new config params login.tokenCookie and login.userNameCookie or central.cookie concatenated with hgLoginToken and hgLoginUserName (because login uses the central db, so it's different for hgwdev vs RR). If those cookies are not set but the wiki cookies are set, then we accept the wiki cookie values and send out the new cookies, removing the wiki cookies the first time that happens. The login system no longer depends on any wiki.* hg.conf settings. refs #17336, #17327 diff --git src/hg/hgLogin/hgLogin.h src/hg/hgLogin/hgLogin.h index 6b601fd..9231e4a 100644 --- src/hg/hgLogin/hgLogin.h +++ src/hg/hgLogin/hgLogin.h @@ -1,27 +1,26 @@ /* hgLogin.h */ /* Copyright (C) 2013 The Regents of the University of California * See README in this or parent directory for licensing information. */ #ifndef hgLogin_H #define hgLogin_H /* ---- global variables ---- */ #define TITLE "UCSC Genome Browser Login v"CGI_VERSION /* ---- hg.conf parameters used by hgLogin ---- */ #define CFG_LOGIN_BROWSER_NAME "login.browserName" #define CFG_LOGIN_BROWSER_ADDR "login.browserAddr" #define CFG_LOGIN_MAIL_SIGNATURE "login.mailSignature" #define CFG_LOGIN_MAIL_RETURN_ADDR "login.mailReturnAddr" -#define CFG_CENTRAL_DOMAIN "central.domain" #define CFG_COOKIIENAME_USERNAME "wiki.userNameCookie" #define CFG_COOKIIENAME_USERID "wiki.loggedInCookie" #endif /* hgLogin_H */