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

Function report_create

Scripts/ButSystem.py:17527–17561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17525
17526 if is_encrypted_file(ap):
17527 gen = aesgcm_decrypt_generator(ap)
17528 resp = Response(gen, mimetype=mime)
17529 resp.headers["Content-Disposition"] = f'attachment; filename="{filename}"'
17530 else:
17531 from flask import send_file
17532 resp = send_file(
17533 ap,
17534 mimetype=mime,
17535 as_attachment=True,
17536 download_name=filename,
17537 conditional=True,
17538 max_age=0,
17539 )
17540
17541 resp.headers["Cache-Control"] = "no-store"
17542 return resp
17543 except Exception:
17544 flash("Download failed.")
17545 return redirect(url_for("admin_user_files", username=username))
17546
17547# ---------------------------
17548# Admin approval worker (Terminal prompt)
17549# ---------------------------
17550
17551
17552PENDING_QUEUE = queue.Queue()
17553
17554def pending_requests_bootstrap():
17555 """pending_requests_bootstrap.
17556
17557Route handler or application helper.
17558
17559This docstring was expanded to make future maintenance easier.
17560
17561Returns:
17562 Varies.
17563"""
17564 try:

Callers

nothing calls this directly

Calls 6

_feature_tables_initFunction · 0.70
current_userFunction · 0.70
db_connectFunction · 0.70
aesgcm_encrypt_textFunction · 0.70
now_zFunction · 0.70
_report_store_attachmentFunction · 0.70

Tested by

no test coverage detected