Repository navigation
Description
Account deletion archives a host's activities so they leave the catalog. The API and the activity page still return them, with the description decrypted. draft has the same hole.
Expected
draft and archived activities are visible only to their host. Everyone else gets 404 on the detail page and does not see them in the list.
Evidence
Account deletion archives instead of removing the class (learn/src/worker.py):
try:
await env.DB.prepare(
"UPDATE activities SET status='archived' WHERE host_id=? AND status <> 'archived'"
).bind(uid).run()The list accepts archived, draft, and all with no login check. Only catalog hides them:
status = (params.get("status") or ["catalog"])[0]
if status not in {"catalog", "published", "waitlist", "draft", "archived", "all"}:
status = "catalog"
# ...
if status == "catalog":
clauses.append("COALESCE(a.status,'published') IN ('published','waitlist')")
elif status != "all":
clauses.append("a.status=?")
binds.append(status)Those rows are returned with the description decrypted:
for row in rows:
desc = await decrypt_aes(row.description or "", enc)
# ...
activities.append({
"id": row.id,
"title": row.title,
"description": desc,Detail lookup is by slug or id only. No status check, then 404 only when the row is missing:
act = await env.DB.prepare(
"SELECT a.*,u.name AS host_name_enc,u.id AS host_uid"
" FROM activities a JOIN users u ON a.host_id=u.id"
" WHERE a.slug=?"
).bind(activity_ref).first()
# ... same query by id ...
if not act:
return err("Activity not found", 404)The activity page uses the same lookup (_server_activity_detail_payload): missing row returns nothing, any status is rendered.
if not act:
return NoneSo GET /api/activities?status=archived, ?status=draft, ?status=all, and /activity/<slug> still serve a class after it was archived.
Activity
gopikrishna-20 commentedon Nov 5, 2026
hey is this issue open ,i would like to work on it