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

Function signup

Scripts/ButSystem.py:10680–10754  ·  view source on GitHub ↗

signup. Route handler or application helper. This docstring was expanded to make future maintenance easier. Returns: Varies.

()

Source from the content-addressed store, hash-verified

10678 add("Localhost", globals().get("CURRENT_LOCALHOST_URL"))
10679 add("Cloudflared", globals().get("CLOUDFLARED_URL"))
10680 onion = globals().get("TOR_ONION")
10681 add("Tor", ("http://" + str(onion).strip()) if onion else None)
10682
10683 # Also include the URL currently used by the visitor when it is not already listed.
10684 try:
10685 add("Current link", request.url_root)
10686 except Exception as exc:
10687 log.error("Could not read current request URL for QR list: %s", exc)
10688
10689 return cards
10690
10691
10692# ---------------------------
10693# Routes: auth/home
10694# ---------------------------
10695
10696@app.route("/landing")
10697def landing():
10698 return index()
10699
10700@app.route("/")
10701def index():
10702 """index.
10703
10704Route handler or application helper.
10705
10706This docstring was expanded to make future maintenance easier.
10707
10708Returns:
10709 Varies.
10710"""
10711 if is_logged_in():
10712 return redirect(url_for("profiler"))
10713 return render_template("landing.html", title="ButSystem", login_link_cards=_login_link_cards())
10714
10715@app.route("/home")
10716@login_required
10717def home():
10718 """Deprecated landing/dashboard page.
10719
10720 The prior dashboard page shown after login was removed per request.
10721 We keep the route to avoid breaking old bookmarks, but redirect users
10722 to Profiler (the new landing page).
10723 """
10724 return redirect(url_for("profiler"))
10725
10726@app.route("/loading")
10727@login_required
10728def loading():
10729 """Small loading screen shown right after login.
10730
10731 This prevents the user from briefly seeing intermediate pages while the
10732 session, profile row, and other bootstrap data is prepared.
10733 """
10734 me = current_user()
10735 try:
10736 prof = get_profile(me)
10737 display_name = (prof.get("nickname") or "").strip() or me

Callers

nothing calls this directly

Calls 5

_client_ipFunction · 0.70
_rate_limit_hitFunction · 0.70
_password_strength_errorFunction · 0.70
db_connectFunction · 0.70
now_zFunction · 0.70

Tested by

no test coverage detected