Skip to content

Commit

Permalink
Rate limit the sudo route (#1823)
Browse files Browse the repository at this point in the history
Co-authored-by: Adrià Casajús <[email protected]>
  • Loading branch information
acasajus and acasajus authored Jul 26, 2023
1 parent d8943cf commit c4003b0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/dashboard/views/enter_sudo.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

from app.config import CONNECT_WITH_PROTON
from app.dashboard.base import dashboard_bp
from app.extensions import limiter
from app.log import LOG
from app.models import PartnerUser
from app.proton.utils import get_proton_partner
Expand All @@ -21,6 +22,7 @@ class LoginForm(FlaskForm):


@dashboard_bp.route("/enter_sudo", methods=["GET", "POST"])
@limiter.limit("3/minute")
@login_required
def enter_sudo():
password_check_form = LoginForm()
Expand Down

0 comments on commit c4003b0

Please sign in to comment.