45a0d85fb6aa60d70be70d79af40efda21cdce1d
braney
  Wed Sep 19 11:08:47 2018 -0700
take out cart stuffing bot check #22109

diff --git src/hg/lib/cart.c src/hg/lib/cart.c
index f80727e..27faf09 100644
--- src/hg/lib/cart.c
+++ src/hg/lib/cart.c
@@ -933,44 +933,33 @@
 	freez(&s);
 	}
     }
 hashElFreeList(&elList);
 }
 
 static void saveState(struct cart *cart)
 /* Save out state to permanent storage in both user and session db. */
 {
 struct sqlConnection *conn = cartDefaultConnector();
 struct dyString *encoded = newDyString(4096);
 
 /* Make up encoded string holding all variables. */
 cartEncodeState(cart, encoded);
 
-/* Make up update statement unless it looks like a robot with
- * a great bunch of variables. */
-if (encoded->stringSize < 16*1024 || cart->userInfo->useCount > 0)
-    {
+/* update sessionDb and userDb tables (removed check for cart stuffing bots) */
 updateOne(conn, userDbTable(), cart->userInfo, encoded->string, encoded->stringSize);
 updateOne(conn, sessionDbTable(), cart->sessionInfo, encoded->string, encoded->stringSize);
-    }
-else
-    {
-    fprintf(stderr, "Cart stuffing bot?  Not writing %d bytes to cart on first use of %d from IP=%s\n",
-            encoded->stringSize, cart->userInfo->id, cgiRemoteAddr());
-    /* Do increment the useCount so that cookie-users don't get stuck here: */
-    updateOne(conn, userDbTable(), cart->userInfo, "", 0);
-    }
 
 /* Cleanup */
 cartDefaultDisconnector(&conn);
 dyStringFree(&encoded);
 }
 
 void cartCheckout(struct cart **pCart)
 /* Free up cart and save it to database. */
 {
 struct cart *cart = *pCart;
 if (cart != NULL)
     {
     saveState(cart);
     struct sqlConnection *conn = cartDefaultConnector();
     cartTrace(cart, "checkout", conn);