Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 10fbeae

Browse files
committed
Code refactoring
1 parent 349f885 commit 10fbeae

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

lib/core/common.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
from lib.core.settings import DUMMY_USER_INJECTION
9393
from lib.core.settings import DYNAMICITY_MARK_LENGTH
9494
from lib.core.settings import ERROR_PARSING_REGEXES
95+
from lib.core.settings import FORCE_COOKIE_EXPIRATION_TIME
9596
from lib.core.settings import FORM_SEARCH_REGEX
9697
from lib.core.settings import GENERIC_DOC_ROOT_DIRECTORY_NAMES
9798
from lib.core.settings import HASHDB_MILESTONE_VALUE
@@ -3510,7 +3511,7 @@ def resetCookieJar(cookieJar):
35103511
for line in lines:
35113512
_ = line.split()
35123513
if len(_) == 7:
3513-
_[4] = "9999999999" # The UNIX time that the variable will expire on
3514+
_[4] = FORCE_COOKIE_EXPIRATION_TIME
35143515
f.write("\n%s" % "\t".join(_))
35153516

35163517
cookieJar.filename = filename

lib/core/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,9 @@
433433
# Default delimiter in cookie values
434434
DEFAULT_COOKIE_DELIMITER = ';'
435435

436+
# Unix timestamp used for forcing cookie expiration when provided with --load-cookies
437+
FORCE_COOKIE_EXPIRATION_TIME = "9999999999"
438+
436439
# Skip unforced HashDB flush requests below the threshold number of cached items
437440
HASHDB_FLUSH_THRESHOLD = 32
438441

0 commit comments

Comments
 (0)