d05d6d82995bcaf90a98daa51ff2e42382e22ee5
max
  Fri May 2 10:42:55 2025 -0700
not outputting warning about missing cookie in cart.c when run from command line, email from Lou, QA runs CGIs from the command line

diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index 0c2630e8f3b..4ef1caf8137 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -1457,31 +1457,31 @@
 
 
 struct cart *cart;
 struct sqlConnection *conn = cartDefaultConnector();
 char *ex;
 boolean userIdFound = FALSE, sessionIdFound = FALSE;
 
 AllocVar(cart);
 cart->hash = newHash(12);
 cart->exclude = newHash(7);
 cart->userId = userId;
 cart->sessionId = sessionId;
 cart->userInfo = loadDb(conn, userDbTable(), userId, &userIdFound);
 cart->sessionInfo = loadDb(conn, sessionDbTable(), sessionId, &sessionIdFound);
 
-if (isEmpty(userId))
+if (isEmpty(userId) && !cgiWasSpoofed())
     fprintf(stderr, "CART userId not sent");
 
 if (sessionIdFound)
     cartParseOverHash(cart, cart->sessionInfo->contents);
 else if (userIdFound)
     cartParseOverHash(cart, cart->userInfo->contents);
 else
     {
     if (isNotEmpty(userId))
         fprintf(stderr, "CART userId sent but not in userDb");
     char *defaultCartContents = getDefaultCart(conn);
     cartParseOverHash(cart, defaultCartContents);
     }
 char when[1024];
 safef(when, sizeof(when), "open %s %s", userId, sessionId);