Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions node/rustchain_v2_integrated_v2.2.1_rip200.py
Original file line number Diff line number Diff line change
Expand Up @@ -2678,6 +2678,8 @@ def api_miners():
@app.route('/admin/oui_deny/list', methods=['GET'])
def list_oui_deny():
"""List all denied OUIs"""
if not is_admin(request):
return jsonify({"ok": False, "error": "forbidden"}), 403
with sqlite3.connect(DB_PATH) as conn:
rows = conn.execute("SELECT oui, vendor, added_ts, enforce FROM oui_deny ORDER BY vendor").fetchall()
return jsonify({
Expand All @@ -2689,6 +2691,8 @@ def list_oui_deny():
@app.route('/admin/oui_deny/add', methods=['POST'])
def add_oui_deny():
"""Add OUI to denylist"""
if not is_admin(request):
return jsonify({"ok": False, "error": "forbidden"}), 403
data = request.get_json()

# Extract client IP (handle nginx proxy)
Expand All @@ -2714,6 +2718,8 @@ def add_oui_deny():
@app.route('/admin/oui_deny/remove', methods=['POST'])
def remove_oui_deny():
"""Remove OUI from denylist"""
if not is_admin(request):
return jsonify({"ok": False, "error": "forbidden"}), 403
data = request.get_json()

# Extract client IP (handle nginx proxy)
Expand Down