a2f0dc37bc0088b880ce3efed8ba68352a849707 hiram Thu Jul 23 11:40:46 2026 -0700 turns out hgwbeta is NOT privateHost refs #31811 diff --git src/hg/hubApi/liftOver.c src/hg/hubApi/liftOver.c index 756bc824c1b..64c723f5ca9 100644 --- src/hg/hubApi/liftOver.c +++ src/hg/hubApi/liftOver.c @@ -202,31 +202,35 @@ * genome-euro.ucsc.edu) can be unrelated DNS labels with no way to bridge * them via gethostname()/getaddrinfo(). */ { char *domain = cfgOption(CFG_CENTRAL_DOMAIN); return (domain != NULL && strstr(domain, ".ucsc.edu") != NULL); } static boolean onGenomeRRMachine() /* Return TRUE if running on one of the genome.ucsc.edu round-robin * machines (hgw0, hgw1, hgw2, ...), which carry SQL grants on * hgcentral.gbMembers. Only meaningful within inUcscEduDomain(). */ { if (hIsPrivateHost()) // stay on localhost for hgwdev and hgwbeta return TRUE; char *hostName = thisHostName(); -if (hostName[0] == '\0' || !startsWith("hgw", hostName)) +if (isEmpty(hostName)) + return FALSE; +if (startsWith("hgwbeta", hostName)) + return TRUE; +if (!startsWith("hgw", hostName)) return FALSE; char afterHgw = hostName[3]; return (afterHgw >= '0' && afterHgw <= '9'); } static boolean fetchGbMembersFromCentral(char *userName, char **retEmail, char **retRealName) /* Relay to genome.ucsc.edu's own loginStatus endpoint to get email/realName * for userName, forwarding this request's Cookie header so genome.ucsc.edu * authenticates the same session. Used on ucsc.edu hosts that lack SQL * grants on hgcentral.gbMembers. Returns FALSE on any failure. */ { char *cookieHeader = getenv("HTTP_COOKIE"); if (isEmpty(cookieHeader)) return FALSE;