mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-26 05:21:00 +00:00
Add error log for invalid preferredUsername
This commit is contained in:
parent
85cacf4239
commit
e746a0b03f
2 changed files with 2 additions and 0 deletions
|
@ -381,6 +381,7 @@ impl FromId<DbConn> for Blog {
|
||||||
.ok_or(Error::MissingApProperty)?
|
.ok_or(Error::MissingApProperty)?
|
||||||
.to_string();
|
.to_string();
|
||||||
if name.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) {
|
if name.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) {
|
||||||
|
tracing::error!("preferredUsername includes invalid character(s): {}", &name);
|
||||||
return Err(Error::InvalidValue);
|
return Err(Error::InvalidValue);
|
||||||
}
|
}
|
||||||
(
|
(
|
||||||
|
|
|
@ -937,6 +937,7 @@ impl FromId<DbConn> for User {
|
||||||
.to_string();
|
.to_string();
|
||||||
|
|
||||||
if username.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) {
|
if username.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) {
|
||||||
|
tracing::error!("preferredUsername includes invalid character(s): {}", &username);
|
||||||
return Err(Error::InvalidValue);
|
return Err(Error::InvalidValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue