prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Size limits on logo, favicon, image uploads
  Sometimes people upload really big images for small things like the logo or the favicon. We should impose some kind of size limit or automatic resizing. 
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `CTFd/forms/setup.py`
  Content:
  ```
  1 from wtforms import (
  2     FileField,
  3     HiddenField,
  4     PasswordField,
  5     RadioField,
  6     SelectField,
  7     StringField,
  8     TextAreaField,
  9 )
  10 from wtforms.fields.html5 import EmailField
  11 from wtforms.validators import InputRequired
  12 
  13 from CTFd.constants.themes import DEFAULT_THEME
  14 from CTFd.forms import BaseForm
  15 from CTFd.forms.fields import SubmitField
  16 from CTFd.utils.config import get_themes
  17 
  18 
  19 class SetupForm(BaseForm):
  20     ctf_name = StringField(
  21         "Event Name", description="The name of your CTF event/workshop"
  22     )
  23     ctf_description = TextAreaField(
  24         "Event Description", description="Description for the CTF"
  25     )
  26     user_mode = RadioField(
  27         "User Mode",
  28         choices=[("teams", "Team Mode"), ("users", "User Mode")],
  29         default="teams",
  30         description="Controls whether users join together in teams to play (Team Mode) or play as themselves (User Mode)",
  31         validators=[InputRequired()],
  32     )
  33 
  34     name = StringField(
  35         "Admin Username",
  36         description="Your username for the administration account",
  37         validators=[InputRequired()],
  38     )
  39     email = EmailField(
  40         "Admin Email",
  41         description="Your email address for the administration account",
  42         validators=[InputRequired()],
  43     )
  44     password = PasswordField(
  45         "Admin Password",
  46         description="Your password for the administration account",
  47         validators=[InputRequired()],
  48     )
  49 
  50     ctf_logo = FileField(
  51         "Logo",
  52         description="Logo to use for the website instead of a CTF name. Used as the home page button.",
  53     )
  54     ctf_banner = FileField("Banner", description="Banner to use for the homepage.")
  55     ctf_small_icon = FileField(
  56         "Small Icon",
  57         description="favicon used in user's browsers. Only PNGs accepted. Must be 32x32px.",
  58     )
  59     ctf_theme = SelectField(
  60         "Theme",
  61         description="CTFd Theme to use",
  62         choices=list(zip(get_themes(), get_themes())),
  63         default=DEFAULT_THEME,
  64         validators=[InputRequired()],
  65     )
  66     theme_color = HiddenField(
  67         "Theme Color",
  68         description="Color used by theme to control aesthetics. Requires theme support. Optional.",
  69     )
  70 
  71     start = StringField(
  72         "Start Time", description="Time when your CTF is scheduled to start. Optional."
  73     )
  74     end = StringField(
  75         "End Time", description="Time when your CTF is scheduled to end. Optional."
  76     )
  77     submit = SubmitField("Finish")
  78
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/CTFd/forms/setup.py b/CTFd/forms/setup.py
  --- a/CTFd/forms/setup.py
  +++ b/CTFd/forms/setup.py
  @@ -49,16 +49,18 @@
   
       ctf_logo = FileField(
           "Logo",
  -        description="Logo to use for the website instead of a CTF name. Used as the home page button.",
  +        description="Logo to use for the website instead of a CTF name. Used as the home page button. Optional.",
  +    )
  +    ctf_banner = FileField(
  +        "Banner", description="Banner to use for the homepage. Optional."
       )
  -    ctf_banner = FileField("Banner", description="Banner to use for the homepage.")
       ctf_small_icon = FileField(
           "Small Icon",
  -        description="favicon used in user's browsers. Only PNGs accepted. Must be 32x32px.",
  +        description="favicon used in user's browsers. Only PNGs accepted. Must be 32x32px. Optional.",
       )
       ctf_theme = SelectField(
           "Theme",
  -        description="CTFd Theme to use",
  +        description="CTFd Theme to use. Can be changed later.",
           choices=list(zip(get_themes(), get_themes())),
           default=DEFAULT_THEME,
           validators=[InputRequired()],
  
verification_info: {"golden_diff": "diff --git a/CTFd/forms/setup.py b/CTFd/forms/setup.py\n--- a/CTFd/forms/setup.py\n+++ b/CTFd/forms/setup.py\n@@ -49,16 +49,18 @@\n \n     ctf_logo = FileField(\n         \"Logo\",\n-        description=\"Logo to use for the website instead of a CTF name. Used as the home page button.\",\n+        description=\"Logo to use for the website instead of a CTF name. Used as the home page button. Optional.\",\n+    )\n+    ctf_banner = FileField(\n+        \"Banner\", description=\"Banner to use for the homepage. Optional.\"\n     )\n-    ctf_banner = FileField(\"Banner\", description=\"Banner to use for the homepage.\")\n     ctf_small_icon = FileField(\n         \"Small Icon\",\n-        description=\"favicon used in user's browsers. Only PNGs accepted. Must be 32x32px.\",\n+        description=\"favicon used in user's browsers. Only PNGs accepted. Must be 32x32px. Optional.\",\n     )\n     ctf_theme = SelectField(\n         \"Theme\",\n-        description=\"CTFd Theme to use\",\n+        description=\"CTFd Theme to use. Can be changed later.\",\n         choices=list(zip(get_themes(), get_themes())),\n         default=DEFAULT_THEME,\n         validators=[InputRequired()],\n", "issue": "Size limits on logo, favicon, image uploads\nSometimes people upload really big images for small things like the logo or the favicon. We should impose some kind of size limit or automatic resizing. \n", "before_files": [{"content": "from wtforms import (\n    FileField,\n    HiddenField,\n    PasswordField,\n    RadioField,\n    SelectField,\n    StringField,\n    TextAreaField,\n)\nfrom wtforms.fields.html5 import EmailField\nfrom wtforms.validators import InputRequired\n\nfrom CTFd.constants.themes import DEFAULT_THEME\nfrom CTFd.forms import BaseForm\nfrom CTFd.forms.fields import SubmitField\nfrom CTFd.utils.config import get_themes\n\n\nclass SetupForm(BaseForm):\n    ctf_name = StringField(\n        \"Event Name\", description=\"The name of your CTF event/workshop\"\n    )\n    ctf_description = TextAreaField(\n        \"Event Description\", description=\"Description for the CTF\"\n    )\n    user_mode = RadioField(\n        \"User Mode\",\n        choices=[(\"teams\", \"Team Mode\"), (\"users\", \"User Mode\")],\n        default=\"teams\",\n        description=\"Controls whether users join together in teams to play (Team Mode) or play as themselves (User Mode)\",\n        validators=[InputRequired()],\n    )\n\n    name = StringField(\n        \"Admin Username\",\n        description=\"Your username for the administration account\",\n        validators=[InputRequired()],\n    )\n    email = EmailField(\n        \"Admin Email\",\n        description=\"Your email address for the administration account\",\n        validators=[InputRequired()],\n    )\n    password = PasswordField(\n        \"Admin Password\",\n        description=\"Your password for the administration account\",\n        validators=[InputRequired()],\n    )\n\n    ctf_logo = FileField(\n        \"Logo\",\n        description=\"Logo to use for the website instead of a CTF name. Used as the home page button.\",\n    )\n    ctf_banner = FileField(\"Banner\", description=\"Banner to use for the homepage.\")\n    ctf_small_icon = FileField(\n        \"Small Icon\",\n        description=\"favicon used in user's browsers. Only PNGs accepted. Must be 32x32px.\",\n    )\n    ctf_theme = SelectField(\n        \"Theme\",\n        description=\"CTFd Theme to use\",\n        choices=list(zip(get_themes(), get_themes())),\n        default=DEFAULT_THEME,\n        validators=[InputRequired()],\n    )\n    theme_color = HiddenField(\n        \"Theme Color\",\n        description=\"Color used by theme to control aesthetics. Requires theme support. Optional.\",\n    )\n\n    start = StringField(\n        \"Start Time\", description=\"Time when your CTF is scheduled to start. Optional.\"\n    )\n    end = StringField(\n        \"End Time\", description=\"Time when your CTF is scheduled to end. Optional.\"\n    )\n    submit = SubmitField(\"Finish\")\n", "path": "CTFd/forms/setup.py"}], "after_files": [{"content": "from wtforms import (\n    FileField,\n    HiddenField,\n    PasswordField,\n    RadioField,\n    SelectField,\n    StringField,\n    TextAreaField,\n)\nfrom wtforms.fields.html5 import EmailField\nfrom wtforms.validators import InputRequired\n\nfrom CTFd.constants.themes import DEFAULT_THEME\nfrom CTFd.forms import BaseForm\nfrom CTFd.forms.fields import SubmitField\nfrom CTFd.utils.config import get_themes\n\n\nclass SetupForm(BaseForm):\n    ctf_name = StringField(\n        \"Event Name\", description=\"The name of your CTF event/workshop\"\n    )\n    ctf_description = TextAreaField(\n        \"Event Description\", description=\"Description for the CTF\"\n    )\n    user_mode = RadioField(\n        \"User Mode\",\n        choices=[(\"teams\", \"Team Mode\"), (\"users\", \"User Mode\")],\n        default=\"teams\",\n        description=\"Controls whether users join together in teams to play (Team Mode) or play as themselves (User Mode)\",\n        validators=[InputRequired()],\n    )\n\n    name = StringField(\n        \"Admin Username\",\n        description=\"Your username for the administration account\",\n        validators=[InputRequired()],\n    )\n    email = EmailField(\n        \"Admin Email\",\n        description=\"Your email address for the administration account\",\n        validators=[InputRequired()],\n    )\n    password = PasswordField(\n        \"Admin Password\",\n        description=\"Your password for the administration account\",\n        validators=[InputRequired()],\n    )\n\n    ctf_logo = FileField(\n        \"Logo\",\n        description=\"Logo to use for the website instead of a CTF name. Used as the home page button. Optional.\",\n    )\n    ctf_banner = FileField(\n        \"Banner\", description=\"Banner to use for the homepage. Optional.\"\n    )\n    ctf_small_icon = FileField(\n        \"Small Icon\",\n        description=\"favicon used in user's browsers. Only PNGs accepted. Must be 32x32px. Optional.\",\n    )\n    ctf_theme = SelectField(\n        \"Theme\",\n        description=\"CTFd Theme to use. Can be changed later.\",\n        choices=list(zip(get_themes(), get_themes())),\n        default=DEFAULT_THEME,\n        validators=[InputRequired()],\n    )\n    theme_color = HiddenField(\n        \"Theme Color\",\n        description=\"Color used by theme to control aesthetics. Requires theme support. Optional.\",\n    )\n\n    start = StringField(\n        \"Start Time\", description=\"Time when your CTF is scheduled to start. Optional.\"\n    )\n    end = StringField(\n        \"End Time\", description=\"Time when your CTF is scheduled to end. Optional.\"\n    )\n    submit = SubmitField(\"Finish\")\n", "path": "CTFd/forms/setup.py"}]}