From c38ce09d7439ecb7c97603d58b2775a567e5f687 Mon Sep 17 00:00:00 2001 From: fef Date: Fri, 2 Dec 2022 09:37:56 +0000 Subject: [PATCH] sanitize setting for number of visible reactions This is kind of a hack, but the lack of validation for settings unfortunately makes it necessary. --- app/views/settings/preferences/appearance/show.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/settings/preferences/appearance/show.html.haml b/app/views/settings/preferences/appearance/show.html.haml index 9ad21a3abf..3da6418e43 100644 --- a/app/views/settings/preferences/appearance/show.html.haml +++ b/app/views/settings/preferences/appearance/show.html.haml @@ -43,7 +43,7 @@ = ff.input :'web.crop_images', wrapper: :with_label, label: I18n.t('simple_form.labels.defaults.setting_crop_images') .fields-group.fields-row__column.fields-row__column-6 - = f.input :setting_visible_reactions, wrapper: :with_label, input_html: { type: 'number', data: { default: '6' } }, hint: false + = f.input :setting_visible_reactions, wrapper: :with_label, input_html: { type: 'number', min: '0', data: { default: '6' } }, hint: false %h4= t 'appearance.discovery'