Leaklens

django__django-16379

FileBasedCache has_key is susceptible to race conditions

Verdict: the issue points to the file or function that was changed (Tier B).

def has_key(self, key, version=None): fname = self._key_to_file(key, version) if os.path.exists(fname): with open(fname, "rb") as f: return not self._is_expired(f) return False

The text points to the exact place to change: “Between the exists() check and open(), it's possible for the file to be deleted.”

All SWE-bench Lite tasks · more django/django tasks · How the check works