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

Skip to content

Commit 0245ce6

Browse files
committed
Fixes #1782
1 parent 7e55af2 commit 0245ce6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

lib/controller/controller.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -209,9 +209,8 @@ def _saveToHashDB():
209209
_[key].data.update(injection.data)
210210
hashDBWrite(HASHDB_KEYS.KB_INJECTIONS, _.values(), True)
211211

212-
_ = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True) or set()
213-
_.update(kb.absFilePaths)
214-
hashDBWrite(HASHDB_KEYS.KB_ABS_FILE_PATHS, _, True)
212+
_ = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True)
213+
hashDBWrite(HASHDB_KEYS.KB_ABS_FILE_PATHS, kb.absFilePaths | (_ if isinstance(_, set) else set()), True)
215214

216215
if not hashDBRetrieve(HASHDB_KEYS.KB_CHARS):
217216
hashDBWrite(HASHDB_KEYS.KB_CHARS, kb.chars, True)

lib/utils/hashdb.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ def retrieve(self, key, unserialize=False):
9797
try:
9898
retVal = unserializeObject(retVal)
9999
except:
100+
retVal = None
100101
warnMsg = "error occurred while unserializing value for session key '%s'. " % key
101102
warnMsg += "If the problem persists please rerun with `--flush-session`"
102103
logger.warn(warnMsg)

0 commit comments

Comments
 (0)