Unicode group name break the group message

Below logs show an error about my testing on the local development env with unicode usernames enable.

In my online site which without unicode usernames enable, but the site language is not english what may causes the default group name became some unicode character so it still break the group message.

My dev version: 2.4.0.beta5 6f992fb7c5
My online version: 2.4.0.beta6 f9a05e4ae7

Message

ActionController::UrlGenerationError (No route matches {:action=>"private_messages_group", :controller=>"list", :format=>"json", :group_name=>"群组名称", :page=>1, :topic_ids=>nil, :username=>"dev"}, possible unmatched constraints: [:group_name]) /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/journey/formatter.rb:57:in 'generate'

Backtrace

/usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/journey/formatter.rb:57:in `generate' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:741:in `generate' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:772:in `generate' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:819:in `url_for' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:272:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:329:in `block in define_url_helper' /src/app/controllers/list_controller.rb:395:in `public_send' /src/app/controllers/list_controller.rb:395:in `construct_url_with' /src/app/controllers/list_controller.rb:179:in `block in generate_message_route' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal/basic_implicit_render.rb:6:in `send_action' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/abstract_controller/base.rb:196:in `process_action' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal/rendering.rb:30:in `process_action' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/abstract_controller/callbacks.rb:42:in `block in process_action' /usr/local/lib/ruby/gems/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:135:in `run_callbacks' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/abstract_controller/callbacks.rb:41:in `process_action' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal/rescue.rb:22:in `process_action' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal/instrumentation.rb:33:in `block in process_action' /usr/local/lib/ruby/gems/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `block in instrument' /usr/local/lib/ruby/gems/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications/instrumenter.rb:24:in `instrument' /usr/local/lib/ruby/gems/2.6.0/gems/activesupport-6.0.0/lib/active_support/notifications.rb:180:in `instrument' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal/instrumentation.rb:32:in `process_action' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal/params_wrapper.rb:245:in `process_action' /usr/local/lib/ruby/gems/2.6.0/gems/activerecord-6.0.0/lib/active_record/railties/controller_runtime.rb:27:in `process_action' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/abstract_controller/base.rb:136:in `process' /usr/local/lib/ruby/gems/2.6.0/gems/actionview-6.0.0/lib/action_view/rendering.rb:39:in `process' /usr/local/lib/ruby/gems/2.6.0/gems/rack-mini-profiler-1.1.0/lib/mini_profiler/profiling_methods.rb:104:in `block in profile_method' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal.rb:191:in `dispatch' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_controller/metal.rb:252:in `dispatch' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:51:in `dispatch' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:33:in `serve' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/journey/router.rb:49:in `block in serve' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/journey/router.rb:32:in `each' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/journey/router.rb:32:in `serve' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/routing/route_set.rb:837:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-protection-2.0.7/lib/rack/protection/frame_options.rb:31:in `call' /src/lib/middleware/omniauth_bypass_middleware.rb:68:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/tempfile_reaper.rb:15:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/conditional_get.rb:25:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/head.rb:12:in `call' /src/lib/content_security_policy/middleware.rb:12:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:232:in `context' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/session/abstract/id.rb:226:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/cookies.rb:648:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/activerecord-6.0.0/lib/active_record/migration.rb:567:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/callbacks.rb:27:in `block in call' /usr/local/lib/ruby/gems/2.6.0/gems/activesupport-6.0.0/lib/active_support/callbacks.rb:101:in `run_callbacks' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/callbacks.rb:26:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/executor.rb:14:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/actionable_exceptions.rb:17:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/better_errors-2.5.1/lib/better_errors/middleware.rb:59:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/debug_exceptions.rb:32:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/show_exceptions.rb:33:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/logster-2.3.2/lib/logster/middleware/reporter.rb:43:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/railties-6.0.0/lib/rails/rack/logger.rb:38:in `call_app' /usr/local/lib/ruby/gems/2.6.0/gems/railties-6.0.0/lib/rails/rack/logger.rb:28:in `call' /src/config/initializers/100-quiet_logger.rb:18:in `call' /src/config/initializers/100-silence_logger.rb:31:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/remote_ip.rb:81:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/request_id.rb:27:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/method_override.rb:22:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/executor.rb:14:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/static.rb:126:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/sendfile.rb:111:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/actionpack-6.0.0/lib/action_dispatch/middleware/host_authorization.rb:83:in `call' /src/lib/middleware/missing_avatars.rb:23:in `call' /src/lib/middleware/turbo_dev.rb:34:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-mini-profiler-1.1.0/lib/mini_profiler/profiler.rb:296:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/message_bus-2.2.2/lib/message_bus/rack/middleware.rb:57:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/railties-6.0.0/lib/rails/engine.rb:526:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/railties-6.0.0/lib/rails/railtie.rb:190:in `public_send' /usr/local/lib/ruby/gems/2.6.0/gems/railties-6.0.0/lib/rails/railtie.rb:190:in `method_missing' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:68:in `block in call' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `each' /usr/local/lib/ruby/gems/2.6.0/gems/rack-2.0.7/lib/rack/urlmap.rb:53:in `call' /usr/local/lib/ruby/gems/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:605:in `process_client' /usr/local/lib/ruby/gems/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:700:in `worker_loop' /usr/local/lib/ruby/gems/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:548:in `spawn_missing_workers' /usr/local/lib/ruby/gems/2.6.0/gems/unicorn-5.5.1/lib/unicorn/http_server.rb:144:in `start' /usr/local/lib/ruby/gems/2.6.0/gems/unicorn-5.5.1/bin/unicorn:128:in `<top (required)>' bin/unicorn:64:in `load' bin/unicorn:64:in `block in <main>' bin/unicorn:63:in `fork' bin/unicorn:63:in `<main>

Env

hostname discourse
process_id 361
application_version 6f992fb7c5a477f48aa9e9c20f2b876ce3c2b5e8
HTTP_HOST localhost:9292
REQUEST_URI /topics/private-messages-group/dev/%E7%BE%A4%E7%BB%84%E5%90%8D%E7%A7%B0.json
REQUEST_METHOD GET
HTTP_USER_AGENT Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36
HTTP_ACCEPT application/json, text/javascript, /; q=0.01
HTTP_REFERER http://localhost:9292/g/群组名称/manage/profile
username dev
2 Likes