Skip to content

Commit

Permalink
Merge branch 'pwncollege:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
mudongliang authored May 15, 2024
2 parents 5c32a35 + 01f0343 commit 78648f7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions dojo_plugin/pages/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from CTFd.models import Users
from CTFd.utils.user import get_current_user, is_admin
from CTFd.utils.decorators import authed_only
from CTFd.plugins import bypass_csrf_protection

from ..models import Dojos
from ..utils import random_home_path, redirect_user_socket, get_current_container
Expand Down Expand Up @@ -91,9 +92,10 @@ def view_workspace(service):

@workspace.route("/workspace/<service>/", websocket=True)
@workspace.route("/workspace/<service>/<path:service_path>", websocket=True)
@workspace.route("/workspace/<service>/")
@workspace.route("/workspace/<service>/<path:service_path>")
@workspace.route("/workspace/<service>/", methods=["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"])
@workspace.route("/workspace/<service>/<path:service_path>", methods=["GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS", "TRACE", "PATCH"])
@authed_only
@bypass_csrf_protection
def forward_workspace(service, service_path=""):
prefix = f"/workspace/{service}/"
assert request.full_path.startswith(prefix)
Expand Down

0 comments on commit 78648f7

Please sign in to comment.