Skip to content

Commit 736a3f2

Browse files
committed
fix(developer): fix ascii check
1 parent bf22d77 commit 736a3f2

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "geode-index"
3-
version = "0.42.0"
3+
version = "0.42.1"
44
edition = "2021"
55

66
[dependencies]

src/endpoints/developers.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,9 @@ pub async fn update_profile(
207207
.await
208208
.or(Err(ApiError::DbAcquireError))?;
209209

210-
if !json.display_name.chars().all(char::is_alphanumeric) {
210+
if !json.display_name.chars().all(|x| char::is_ascii_alphanumeric(&x)) {
211211
return Err(ApiError::BadRequest(
212-
"Display name must contain only alphanumeric characters".into(),
212+
"Display name must contain only ASCII alphanumeric characters".into(),
213213
));
214214
}
215215

0 commit comments

Comments
 (0)