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

Class _SafeHTTPRedirectHandler

Scripts/ButSystem.py:12724–12731  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12722 destination = _unique_destination(destination_dir, os.path.basename(source)); shutil.move(source, destination); new_rel = os.path.relpath(destination, user_root(current_user())).replace(os.sep, "/"); _remap_file_metadata(current_user(), rel, new_rel); count += 1
12723 except Exception: pass
12724 _log_file_activity(current_user(), "bulk_move", destination_rel, f"{count} entries"); flash(f"Moved {count} entries."); return redirect(url_for("files", p=destination_rel))
12725 flash("Unknown bulk action."); return redirect(url_for("files", p=return_p))
12726
12727
12728@app.route("/download")
12729@login_required
12730def download():
12731 rel = request.args.get("p", "") or ""
12732 try:
12733 rel = safe_relpath(rel); target = abs_user_path(current_user(), rel)
12734 if not rel or not os.path.exists(target): abort(404)

Callers 1

ButSystem.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected