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

Function upload

Scripts/ButSystem.py:11660–11706  ·  view source on GitHub ↗

Upload a file into the user vault (plaintext). Per your request, vault files are stored without encryption. (Older installs may still contain encrypted blobs; downloading them remains supported.)

()

Source from the content-addressed store, hash-verified

11658 "country": (request.form.get("country") or "").strip(),
11659 "state": (request.form.get("state") or "").strip(),
11660 "town": (request.form.get("town") or "").strip(),
11661 "city": (request.form.get("city") or "").strip(),
11662 "address": (request.form.get("address") or "").strip(),
11663 "family_members": _lines10(request.form.get("family_members") or ""),
11664 "close_friends": _lines10(request.form.get("close_friends") or ""),
11665 }
11666
11667 # Basic length limits (keep DB small)
11668 for k in list(extras.keys()):
11669 extras[k] = extras[k][:200]
11670
11671 set_profile(current_user(), nickname, bio[:800], links, extras=extras)
11672 flash("Profile saved.")
11673 return redirect(url_for("profile"))
11674
11675
11676# ---------------------------
11677# Account security: password change + security questions 2FA + recovery
11678# ---------------------------
11679
11680def _norm_answer(s: str) -> str:
11681 """_norm_answer.
11682
11683Internal helper function.
11684
11685This docstring was added automatically to improve maintainability.
11686
11687Args:
11688 s: Parameter.
11689
11690Returns:
11691 Varies.
11692"""
11693 return (s or "").strip().lower()
11694
11695def get_user_security(username: str) -> dict:
11696 """get_user_security.
11697
11698Internal helper function.
11699
11700This docstring was added automatically to improve maintainability.
11701
11702Args:
11703 username: Parameter.
11704
11705Returns:
11706 Varies.
11707"""
11708 conn = db_connect()
11709 row = conn.execute("SELECT * FROM user_security WHERE username=?", (username,)).fetchone()

Callers

nothing calls this directly

Calls 6

_filestorage_sizeFunction · 0.70
safe_relpathFunction · 0.70
abs_user_pathFunction · 0.70
current_userFunction · 0.70
_save_plain_uploadFunction · 0.70

Tested by

no test coverage detected