mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
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
This commit is contained in:
committed by
Tim Abbott
parent
2ad60b0cda
commit
491b1513eb
@@ -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_long_text_field: field.type === all_field_types.LONG_TEXT.id,
|
||||||
is_user_field: field.type === all_field_types.USER.id,
|
is_user_field: field.type === all_field_types.USER.id,
|
||||||
is_date_field: field.type === all_field_types.DATE.id,
|
is_date_field: field.type === all_field_types.DATE.id,
|
||||||
|
is_url_field: field.type === all_field_types.URL.id,
|
||||||
is_select_field,
|
is_select_field,
|
||||||
field_choices,
|
field_choices,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -20,6 +20,8 @@
|
|||||||
<input class="custom_user_field_value datepicker" data-field-id="{{ field.id }}" type="text"
|
<input class="custom_user_field_value datepicker" data-field-id="{{ field.id }}" type="text"
|
||||||
value="{{ field_value.value }}" />
|
value="{{ field_value.value }}" />
|
||||||
<span class="remove_date"><i class="fa fa-close"></i></span>
|
<span class="remove_date"><i class="fa fa-close"></i></span>
|
||||||
|
{{else if is_url_field }}
|
||||||
|
<input class="custom_user_field_value" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="2048" />
|
||||||
{{else}}
|
{{else}}
|
||||||
<input class="custom_user_field_value" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="50" />
|
<input class="custom_user_field_value" type="{{ field_type }}" value="{{ field_value.value }}" maxlength="50" />
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|||||||
Reference in New Issue
Block a user