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

Function _validate_host_header

Scripts/ButSystem.py:1532–1540  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1530
1531def _clear_device_token_cookie(resp):
1532 resp.delete_cookie(DEVICE_TOKEN_COOKIE)
1533 # Do not delete fp cookie so device approval flow can work.
1534
1535def _trusted_device_lookup(fp: str, token: str) -> Optional[str]:
1536 """Return username if token matches a trusted device and is approved."""
1537 if not fp or not token:
1538 return None
1539 th = _sha256_hex(token)
1540 if not th:
1541 return None
1542 conn = db_connect()
1543 row = conn.execute(

Callers

nothing calls this directly

Calls 1

_host_is_allowedFunction · 0.70

Tested by

no test coverage detected