From e746a0b03f2223d8ac0357a78a1a5fe6a0d221ad Mon Sep 17 00:00:00 2001 From: Kitaiti Makoto Date: Thu, 5 Jan 2023 02:25:58 +0900 Subject: [PATCH] Add error log for invalid preferredUsername --- plume-models/src/blogs.rs | 1 + plume-models/src/users.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/plume-models/src/blogs.rs b/plume-models/src/blogs.rs index 489589a1..0458895c 100644 --- a/plume-models/src/blogs.rs +++ b/plume-models/src/blogs.rs @@ -381,6 +381,7 @@ impl FromId for Blog { .ok_or(Error::MissingApProperty)? .to_string(); if name.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) { + tracing::error!("preferredUsername includes invalid character(s): {}", &name); return Err(Error::InvalidValue); } ( diff --git a/plume-models/src/users.rs b/plume-models/src/users.rs index 3908739c..8dbd2712 100644 --- a/plume-models/src/users.rs +++ b/plume-models/src/users.rs @@ -937,6 +937,7 @@ impl FromId for User { .to_string(); if username.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) { + tracing::error!("preferredUsername includes invalid character(s): {}", &username); return Err(Error::InvalidValue); }