Skip to content

maxUsername config value not respected

Low
MaddyUnderStars published GHSA-r7h4-76f7-6264 Feb 2, 2023

Package

fosscord-server

Affected versions

d8f32cb05a25c706d7055b55752358e04f205af0

Patched versions

a03f7c894809d4db48cf5c417c07f3fb0d0fde30

Description

Summary

maxUsername value is not respected. Username max value is set to 100 as per schema.

Details

Sending a PATCH request to /api/users/@me with any username with length < 100 will be accepted, regardless of maxUsername value set in config.

Mitigation

The maxUsername config value is now respected as of commit a03f7c8.
However, the default value of maxUsername was previously 127. The default now is 32, which matches Discord.com.
We recommend existing instances change this value.

Severity

Low

CVE ID

No known CVE

Weaknesses

No CWEs

Credits