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

Function k_mtime

Scripts/ButSystem.py:11532–11545  ·  view source on GitHub ↗

k_mtime. 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

11530
11531 resp = render_template("device_access.html", title=_("Device auto‑login"), admins=admins, status=status)
11532 return resp
11533
11534@app.route("/device_access/poll")
11535def device_access_poll():
11536 """Client polls this endpoint for approval.
11537 When approved, it issues a trusted device token cookie and logs the user in (if 2FA is not enabled).
11538 """
11539 if is_logged_in():
11540 return jsonify({"ok": True, "status": "approved", "logged_in": True})
11541 fp = (request.cookies.get(DEVICE_FP_COOKIE) or "").strip()
11542 if not fp:
11543 return jsonify({"ok": True, "status": "none", "logged_in": False})
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,)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected