Internal error when showing profile of user with underscores
User with usernames in the format following [a-zA-Z]{2,}_+[a-zA-Z]{7,}__+[a-zA-Z]{6,}
crash the server when trying to directly access their profile page.
Other usernames may crash, I did not try all possible combinations.
I have the following error in the logs:
10:31:05.852 request_id=2m0lpo3i96r12envgk000jk1 [info] GET /a__aaaaaaa___aaaaaa
10:31:05.852 request_id=2m0lpo3i96r12envgk000jk1 [info] Converted error Cachex.ExecutionError to 500 response
10:31:05.852 request_id=2m0lpo3i96r12envgk000jk1 [info] Sent 500 in 494µs
10:31:05.853 [error] #PID<0.929.0> running Pleroma.Web.Endpoint (cowboy_protocol) terminated
Server: localhost:4000 (http)
Request: GET /a__aaaaaaa___aaaaaa
** (exit) an exception was raised:
** (Cachex.ExecutionError) no function clause matching in Pleroma.FlakeId.decode_base62/2
(cachex) lib/cachex.ex:1447: Cachex.unwrap_unsafe/1
(pleroma) lib/pleroma/user.ex:467: Pleroma.User.get_cached_by_id/1
(pleroma) lib/pleroma/user.ex:487: Pleroma.User.get_cached_by_nickname_or_id/1
(pleroma) lib/pleroma/web/router.ex:532: Fallback.RedirectController.redirector_with_meta/2
(pleroma) lib/pleroma/web/router.ex:520: Fallback.RedirectController.action/2
(pleroma) lib/pleroma/web/router.ex:520: Fallback.RedirectController.phoenix_controller_pipeline/2
(pleroma) lib/pleroma/web/endpoint.ex:5: Pleroma.Web.Endpoint.instrument/4
(phoenix) lib/phoenix/router.ex:275: Phoenix.Router.__call__/1