From 491b1513ebad993938aacc794bd65b14c66f5b06 Mon Sep 17 00:00:00 2001 From: Archisman Das Date: Sun, 3 Apr 2022 03:04:55 +0530 Subject: [PATCH] settings: Fix length of custom profile field URL input. The backend validates that URL inputs are RFC valid URLs (with no specific length limit), but the frontend appears to have a maximum length of 50 specified, likely because of a copy-paste error. Increase the HTML maxlength for this input to 2048, which is a length supported for URLs by all major browsers. Fixes #21633 --- static/js/settings_account.js | 1 + static/templates/settings/custom_user_profile_field.hbs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/static/js/settings_account.js b/static/js/settings_account.js index 36505352ab..92d85e1477 100644 --- a/static/js/settings_account.js +++ b/static/js/settings_account.js @@ -170,6 +170,7 @@ export function append_custom_profile_fields(element_id, user_id) { is_long_text_field: field.type === all_field_types.LONG_TEXT.id, is_user_field: field.type === all_field_types.USER.id, is_date_field: field.type === all_field_types.DATE.id, + is_url_field: field.type === all_field_types.URL.id, is_select_field, field_choices, }); diff --git a/static/templates/settings/custom_user_profile_field.hbs b/static/templates/settings/custom_user_profile_field.hbs index 9dadea3289..7a7e2e8ebb 100644 --- a/static/templates/settings/custom_user_profile_field.hbs +++ b/static/templates/settings/custom_user_profile_field.hbs @@ -20,6 +20,8 @@ + {{else if is_url_field }} + {{else}} {{/if}}