From ee4db54c3e2e0536d927f71ebc6ec8b89519572f Mon Sep 17 00:00:00 2001 From: pwnstr <71965491+pwnstr@users.noreply.github.com> Date: Sun, 27 Sep 2020 10:26:36 +0100 Subject: [PATCH] Fix early termination bug in cookiesForURL The condition for the while loop was causing the config cookie search to break after only checking the full domain, instead of trying higher-level domains. For example www.imagefap.com would be tried but not imagefap.com. --- src/main/java/com/rarchives/ripme/utils/Http.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/rarchives/ripme/utils/Http.java b/src/main/java/com/rarchives/ripme/utils/Http.java index 1b85005c..fb90bbd8 100644 --- a/src/main/java/com/rarchives/ripme/utils/Http.java +++ b/src/main/java/com/rarchives/ripme/utils/Http.java @@ -81,8 +81,9 @@ public class Http { while (parts.length > 1) { String domain = String.join(".", parts); // Try to get cookies for this host from config + logger.info("Trying to load cookies from config for " + domain); cookieStr = Utils.getConfigString("cookies." + domain, ""); - if (cookieStr.equals("")) { + if (!cookieStr.equals("")) { cookieDomain = domain; // we found something, start parsing break;