MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / current_user

Function current_user

Scripts/ButSystem.py:1722–1732  ·  view source on GitHub ↗

current_user. Internal helper function. This docstring was added automatically to improve maintainability. Returns: Varies.

()

Source from the content-addressed store, hash-verified

1720 # cookie is set in after_request if needed
1721 pass
1722 if is_logged_in():
1723 return None
1724 fp = (request.cookies.get(DEVICE_FP_COOKIE) or "").strip()
1725 tok = (request.cookies.get(DEVICE_TOKEN_COOKIE) or "").strip()
1726 if not fp or not tok:
1727 return None
1728 u = _trusted_device_lookup(fp, tok)
1729 if not u:
1730 return None
1731 # Do not auto-login when 2FA is enabled.
1732 if user_2fa_enabled(u):
1733 return None
1734 # Scope capacity check (match normal login)
1735 try:

Callers 15

is_logged_inFunction · 0.70
wrapperFunction · 0.70
privacy_panicFunction · 0.70
privacy_resumeFunction · 0.70
require_adminFunction · 0.70
inject_ctxFunction · 0.70
loadingFunction · 0.70
api_bootstrapFunction · 0.70
profileFunction · 0.70
profile_saveFunction · 0.70
settings_securityFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected