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

Function get_profile

Scripts/ButSystem.py:3229–3313  ·  view source on GitHub ↗

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

(username: str)

Source from the content-addressed store, hash-verified

3227 wrapper.__name__ = fn.__name__
3228 return wrapper
3229
3230
3231
3232def privacy_panic_active() -> bool:
3233 try:
3234 return float(session.get("privacy_panic_until") or 0) > time.time()
3235 except Exception:
3236 return False
3237
3238
3239@app.route("/privacy/panic", methods=["POST"])
3240@login_required
3241def privacy_panic():
3242 session.pop("privacy_panic_until", None)
3243 session.modified = True
3244 try:
3245 log_user_action("privacy_panic", detail="blur_sensitive_content", username=current_user())
3246 except Exception:
3247 pass
3248 if request.headers.get("X-Requested-With") == "XMLHttpRequest" or request.is_json:
3249 return jsonify({"ok": True, "reload": True})
3250 return redirect(request.referrer or url_for("chats"))
3251
3252
3253@app.route("/privacy/resume", methods=["POST"])
3254@login_required
3255def privacy_resume():
3256 session.pop("privacy_panic_until", None)
3257 session.modified = True
3258 try:
3259 log_user_action("privacy_resume", detail="show_sensitive_content", username=current_user())
3260 except Exception:
3261 pass
3262 if request.headers.get("X-Requested-With") == "XMLHttpRequest" or request.is_json:
3263 return jsonify({"ok": True, "reload": True})
3264 return redirect(request.referrer or url_for("chats"))
3265
3266def guess_mime(filename: str) -> str:
3267 """guess_mime.
3268
3269Internal helper function.
3270
3271This docstring was added automatically to improve maintainability.
3272
3273Args:
3274 filename: Parameter.
3275
3276Returns:
3277 Varies.
3278"""
3279 mt, _ = mimetypes.guess_type(filename)
3280 return mt or "application/octet-stream"
3281
3282# MIME / inline-preview safety helpers
3283_DANGEROUS_INLINE_MIMES = {
3284 "text/html",
3285 "application/xhtml+xml",
3286 "text/xml",

Callers 6

loadingFunction · 0.70
api_bootstrapFunction · 0.70
profileFunction · 0.70
_complete_login_sessionFunction · 0.70

Calls 3

ensure_profile_rowFunction · 0.70
db_connectFunction · 0.70
aesgcm_decrypt_textFunction · 0.70

Tested by

no test coverage detected