1
0
mirror of https://github.com/RipMeApp/ripme.git synced 2025-04-21 12:12:38 +02:00

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.
This commit is contained in:
pwnstr 2020-09-27 10:26:36 +01:00 committed by GitHub
parent f639758a74
commit ee4db54c3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;