From 6067b668ac50e9fccfb854b75afa37f61f9f13fd Mon Sep 17 00:00:00 2001 From: "Troll (Hermes Agent)" Date: Sun, 20 Sep 2026 16:14:41 +0000 Subject: [PATCH] Raise request form rate limit from 5/min to 60/min (booth shares one IP) --- README.md | 4 ++-- VERSION | 2 +- app.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 831874b..6099e3d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Theme Song Booth (MusicGPT Edition) -![Version](https://img.shields.io/badge/version-v0.9.3-blue) +![Version](https://img.shields.io/badge/version-v0.9.4-blue) A Flask web application for running a convention booth where visitors request a custom AI-generated theme song. Operators manage the queue from an admin dashboard, generate prompts via Hermes, queue generations through the MusicGPT API, and deliver final songs by email. @@ -42,7 +42,7 @@ The MusicGPT fork automates song generation: instead of manually creating songs | Page | Path | Purpose | |------|------|---------| -| Request form | `/request` | Visitors enter email, name, pronouns, hobbies, notable facts, and extra requests. The music style is picked from three dropdowns: **Decade** (required), **Basic style** (required), and **Additional style** (optional). Decades and genres are loaded from `/mnt/Storage/Decades.txt` and `/mnt/Storage/music_genres_grouped.txt` (a grouped file where section headings are rendered as non-selectable dropdown groups). Rate limited to 5 submissions per minute per IP. | +| Request form | `/request` | Visitors enter email, name, pronouns, hobbies, notable facts, and extra requests. The music style is picked from three dropdowns: **Decade** (required), **Basic style** (required), and **Additional style** (optional). Decades and genres are loaded from `/mnt/Storage/Decades.txt` and `/mnt/Storage/music_genres_grouped.txt` (a grouped file where section headings are rendered as non-selectable dropdown groups). Rate limited to 60 submissions per minute per IP (a shared booth IP means many visitors hit the same address). | | Closed page | `/request` (when booth is closed) | Shows a friendly closed banner instead of the form when the operator marks the booth closed. | | Thanks | `/thanks/` | Confirmation page shown after a request is submitted. | | Order status | `/status` | Customers enter their email to see all their requests and statuses. | diff --git a/VERSION b/VERSION index 965065d..a602fc9 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.3 +0.9.4 diff --git a/app.py b/app.py index d2bf7cc..f1e6f22 100644 --- a/app.py +++ b/app.py @@ -167,14 +167,14 @@ def index(): @app.route('/request', methods=['GET', 'POST']) -@limiter.limit("5 per minute") +@limiter.limit("60 per minute") def request_form(): """ Public request form. GET -> shows the form with the banner image, or a closed message if the booth is closed. POST -> validates the email, creates a database record, sends a confirmation email, and redirects to the thanks page. - Rate limited to 5 submissions per minute per IP. + Rate limited to 60 submissions per minute per IP (a shared booth IP means many visitors hit the same address). """ if not get_booth_open(): return render_template('closed.html')