From 9de219fd80cf6c441e61850062707d3ef329e0e0 Mon Sep 17 00:00:00 2001 From: rubenwardy Date: Fri, 27 Mar 2020 15:30:08 +0000 Subject: [PATCH] Increase package name and title length limits in form validation --- app/blueprints/packages/packages.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/blueprints/packages/packages.py b/app/blueprints/packages/packages.py index 8bfce65f..0b7ff056 100644 --- a/app/blueprints/packages/packages.py +++ b/app/blueprints/packages/packages.py @@ -168,8 +168,8 @@ def download(package): class PackageForm(FlaskForm): - name = StringField("Name (Technical)", [InputRequired(), Length(1, 20), Regexp("^[a-z0-9_]+$", 0, "Lower case letters (a-z), digits (0-9), and underscores (_) only")]) - title = StringField("Title (Human-readable)", [InputRequired(), Length(3, 50)]) + name = StringField("Name (Technical)", [InputRequired(), Length(1, 100), Regexp("^[a-z0-9_]+$", 0, "Lower case letters (a-z), digits (0-9), and underscores (_) only")]) + title = StringField("Title (Human-readable)", [InputRequired(), Length(3, 100)]) short_desc = StringField("Short Description (Plaintext)", [InputRequired(), Length(1,200)]) desc = TextAreaField("Long Description (Markdown)", [Optional(), Length(0,10000)]) type = SelectField("Type", [InputRequired()], choices=PackageType.choices(), coerce=PackageType.coerce, default=PackageType.MOD)