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

Function k_size

Scripts/ButSystem.py:11546–11559  ·  view source on GitHub ↗

k_size. Internal helper function. This docstring was added automatically to improve maintainability. Args: e: Parameter. Returns: Varies.

(e)

Source from the content-addressed store, hash-verified

11544
11545 conn = db_connect()
11546 row = conn.execute(
11547 "SELECT id, username, status, approved_by FROM device_access_requests WHERE device_fp=? ORDER BY id DESC LIMIT 1",
11548 (fp,)
11549 ).fetchone()
11550 conn.close()
11551 if not row:
11552 return jsonify({"ok": True, "status": "none", "logged_in": False})
11553
11554 status = row["status"]
11555 if status != "approved":
11556 return jsonify({"ok": True, "status": status, "logged_in": False})
11557
11558 username = row["username"]
11559 # If 2FA enabled, do not auto-login.
11560 if user_2fa_enabled(username):
11561 return jsonify({"ok": True, "status": "approved", "logged_in": False, "needs_login": True})
11562

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected