mirror of
https://github.com/aljazceru/CTFd.git
synced 2026-02-14 02:34:23 +01:00
# 3.0.0a2 / 2020-07-09 **General** * Accept additional profile fields during registration (affiliation, website, country) * This does not add additional inputs. Themes or additional JavaScript can add the form inputs. **Admin Panel** * Redesign the challenge creation form to use a radio button with challenge type selection instead of a select input **API** * Admins can no longer ban themselves through `PATCH /api/v1/users/[user_id]` **Themes** * Spinner centering has been switched from a hard coded margin in CSS to flexbox CSS classes from Bootstrap **Plugins** * Revert plugin menu (`register_admin_plugin_menu_bar`, `register_user_page_menu_bar`) changes to 2.x code **Miscellaneous** * Fix issue with `Configs.ctf_name` returning incorrect value * Add prerender step back into challenges.js * Better handling of missing challenge types. Missing challenge types no longer bring down all other challenges.
26 lines
653 B
Python
26 lines
653 B
Python
from flask import render_template
|
|
from werkzeug.exceptions import InternalServerError
|
|
|
|
|
|
# 404
|
|
def page_not_found(error):
|
|
return render_template("errors/404.html", error=error.description), 404
|
|
|
|
|
|
# 403
|
|
def forbidden(error):
|
|
return render_template("errors/403.html", error=error.description), 403
|
|
|
|
|
|
# 500
|
|
def general_error(error):
|
|
if error.description == InternalServerError.description:
|
|
error.description = "An Internal Server Error has occurred"
|
|
|
|
return render_template("errors/500.html", error=error.description), 500
|
|
|
|
|
|
# 502
|
|
def gateway_error(error):
|
|
return render_template("errors/502.html", error=error.description), 502
|