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

Function abs_user_path

Scripts/ButSystem.py:3485–3505  ·  view source on GitHub ↗

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

(username: str, rel: str)

Source from the content-addressed store, hash-verified

3483 col = PROFILE_EXTRA_MAP.get(k)
3484 if col and col in cols:
3485 set_parts.append(f"{col}=?")
3486 params.append(aesgcm_encrypt_text(str(v)))
3487
3488 set_parts.append("updated_at=?")
3489 params.append(now_z())
3490 params.append(username)
3491
3492 sql = f"UPDATE profiles SET {', '.join(set_parts)} WHERE username=?"
3493 conn.execute(sql, tuple(params))
3494 conn.commit()
3495
3496 # Keep a Profiler entry automatically mirrored from "My Profile".
3497 try:
3498 profiler_sync_from_user_profile(username)
3499 except Exception:
3500 pass
3501
3502 conn.close()
3503
3504def set_profile_pic(username: str, file_stream, mime: str):
3505 """Store a user's profile picture on disk (plaintext).
3506
3507 We keep profile pictures capped (PFP_MAX_BYTES) to avoid slow uploads and
3508 reduce risk/abuse.

Callers 7

list_dir_entriesFunction · 0.70
mkdirFunction · 0.70
uploadFunction · 0.70
api_upload_chunkFunction · 0.70
deleteFunction · 0.70
downloadFunction · 0.70
view_fileFunction · 0.70

Calls 2

safe_relpathFunction · 0.70
user_rootFunction · 0.70

Tested by

no test coverage detected