RGJ
(Richard - Communiteq)
2023 年 9 月 25 日午前 10:33
1
ホラー話です。
フォーラムのユーザー数が以前のように伸びていないことに気づいたコミュニティマネージャーから連絡がありました。
調査の結果、新規登録したユーザーの多くが非アクティブとみなされて削除されていることがわかりました。
これは、clean_up_inactive_users_after_days の設定が 1 になっていたためでした
そこで履歴アイコンをクリックしたところ、この設定が1年以上前に 730 (2年)から 1,095 (3年)に変更されていたことがわかりました。
そうなんです、数字のサイト設定で桁区切り文字としてカンマ(または非英語圏で一般的なドット)を入力すると、最初の区切り文字の後ろがすべて サイレントに(!) カットされてしまいます。さらに悪いことに、これはハードページリフレッシュ後にのみ表示されます。
「いいね!」 12
Lilly
(Lillian Louis)
2023 年 9 月 25 日午後 1:03
3
高い数値設定で他に影響を受けているものがあるか気になりますね
「いいね!」 6
RGJ
(Richard - Communiteq)
2023 年 9 月 25 日午後 2:44
4
はい、そうです。
すべての 数値設定が影響を受けます。そして、たくさんの日数、分数、そして一般的な高値設定があります。
imap_polling_old_emails:1000
decompressed_theme_max_file_size_mb:1000
topic_views_heat_low:1000
secure_uploads_max_email_embed_image_size_kb:1024
maximum_session_age:1440
post_edit_time_limit:1440
composer_media_optimization_image_resize_dimensions_threshold:1920
composer_media_optimization_image_resize_width_target:1920
max_bookmarks_per_user:2000
topic_views_heat_medium:2000
default_other_new_topic_duration_minutes:2880
polling_interval:3000
topic_views_heat_high:3500
max_image_size_kb:4096
max_attachment_size_kb:4096
min_topic_views_for_delete_confirm:5000
max_form_template_content_length:5000
invite_link_max_redemptions_limit:5000
sitemap_page_size:10000
max_notifications_per_user:10000
short_progress_text_threshold:10000
auto_close_topics_post_count:10000
max_drafts_per_user:10000
anonymous_account_duration_minutes:10080
default_email_digest_frequency:10080
tl3_requires_posts_read_cap:20000
anon_polling_interval:25000
max_post_length:32000
tl2_post_edit_time_limit:43200
max_export_file_size_kb:50000
max_bulk_invites:50000
background_polling_interval:60000
decompressed_backup_max_file_size_mb:100000
search_enable_recent_regular_posts_offset_size:200000
default_other_auto_track_topics_after_msecs:300000
max_draft_length:400000
composer_media_optimization_image_bytes_optimization_threshold:524288
suggested_topics_unread_max_days_old:
suggested_topics_max_days_old:
pending_users_reminder_delay_minutes:
invite_expiry_days:
purge_unactivated_users_grace_period_days:
anonymous_account_duration_minutes:
ignored_users_message_gap_days:
clean_up_inactive_users_after_days:
clean_up_unused_staged_users_after_days:
show_time_gap_days:
old_post_notice_days:
returning_users_days:
suppress_digest_email_after_days:
disallow_reply_by_email_after_days:
delete_email_logs_after_days:
reset_bounce_score_after_days:
delete_rejected_email_after_days:
purge_deleted_uploads_grace_period_days:
tl2_requires_days_visited:
tl3_requires_days_visited:
invalidate_inactive_admin_email_after_days:
send_old_credential_reminder_days:
search_query_log_max_retention_days:
cold_age_days_low:
cold_age_days_medium:
cold_age_days_high:
delete_drafts_older_than_n_days:
delete_merged_stub_topics_after_days:
default_other_new_topic_duration_minutes:
retain_web_hook_events_period_days:
revoke_api_keys_unused_days:
revoke_api_keys_maxlife_days:
revoke_user_api_keys_unused_days:
revoke_user_api_keys_maxlife_days:
「いいね!」 7
ted
(Ted Johansson)
2023 年 10 月 10 日午後 3:49
6
RGJさん、レポートありがとうございます!
これは確かに恐ろしい問題ですね。UIでは数値入力のみを許可し、バックエンドでは安全のため数字以外の文字をすべて削除することで、この問題を修正しました。
main ← dev/integer-site-setting-fields
opened 02:48PM - 06 Oct 23 UTC
### What is this change?
Currently, if you set an integer site setting in the… admin interface and include thousands separators, you will silently configure the wrong value.
**Example:**
```
1,000 == 1
1.000 == 1
1 000 == 1
```
This PR replaces `TextField` inputs for integer site settings with `NumberField`.
It also cleans the numeric input of any non-digits in the backend in case any separators make it through.
### Not in this PR
- The actual value that is set in the back-end is not sent back to the front-end. We probably should.
- We should probably change the latter to use [native number input](https://caniuse.com/input-number) in a separate PR.
- The `SiteSettingsController#update` method is pretty big. I'm considering extracting the logic into a Ruby object that can be tested in isolation, but not in this PR.
「いいね!」 11
RGJ
(Richard - Communiteq)
2024 年 6 月 20 日午後 1:04
9
これを再度開きます。状況は後退し、さらに悪化したようです。
管理者 → 設定 → 基本設定 → 推奨トピック に移動します。
デスクトップ版 Firefox
5.0 を入力して保存します(エラーなし)。更新すると、50 に設定されていることがわかります。
5,0 を入力して保存します(エラーなし)。更新すると、0 に設定されていることがわかります。
iOS 版 Safari
5.0 を入力して保存します(エラーなし)。更新すると、50 に設定されていることがわかります。
5,0 を入力して保存します(エラーなし)。更新すると、50 に設定されていることがわかります。
「いいね!」 4
リチャード、レポートありがとうございます!私もあなたが説明していることを再現できます。「すべて「設計どおり」です。ただし、Firefoxで「5,0」が「0」になるのはバグです。それは奇妙なものです。
管理者が確認できるように、少なくとも管理者が確認する内容を更新し、区切り文字を含まないように、もう一度確認する必要があるようです。現在、変更を保存した後にWebブラウザを更新しないと、それが表示されません。
しかし、管理者がこれらの間違いを避け、混乱しないように、さらに多くのことができると思います。「suggested topics max days old」に「364.5 days」を入力すると、それが3645日になるのは間違っているように感じます。これらの種類のフィールドには数字以外のものを入力できないようにするだけではどうでしょうか。
「いいね!」 6
FIX: Do not allow , or . in site setting integer input by martin-brennan · Pull Request #27618 · discourse/discourse · GitHub で修正しました。これらのフィールドには数値しか入力できなくなりました。, や . の区切り文字はもう使用できません。
以前は、整数サイト設定の入力をサーバー側でのみサニタイズしていましたが、ユーザーが例えば 100.5 を入力した場合に 1005 になり、UI にそれが反映されないという、少し混乱を招く状況がありました。
現在、これらの設定にはネイティブの数値入力を使用しているため、 . や , を入力できないようにすることで、エクスペリエンスを少し改善できます。これらは整数のみを対象としており、ステップサイズは 1 です。他のすべての文字は、このネイティブの数値入力で既に防止されています。
「いいね!」 6
このトピックは3日後に自動的に閉じられました。新しい返信はもう許可されていません。