mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-12-23 02:26:36 +00:00
Format
This commit is contained in:
parent
699fdc30d9
commit
3580fb04fa
2 changed files with 17 additions and 7 deletions
|
@ -18,11 +18,14 @@ use openssl::{
|
|||
rsa::Rsa,
|
||||
sign::{Signer, Verifier},
|
||||
};
|
||||
use plume_common::{activity_pub::{
|
||||
inbox::{AsActor, FromId},
|
||||
sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source, SourceProperty,
|
||||
ToAsString, ToAsUri,
|
||||
}, utils::iri_percent_encode_seg};
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
inbox::{AsActor, FromId},
|
||||
sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source,
|
||||
SourceProperty, ToAsString, ToAsUri,
|
||||
},
|
||||
utils::iri_percent_encode_seg,
|
||||
};
|
||||
use webfinger::*;
|
||||
|
||||
#[derive(Queryable, Identifiable, Clone, AsChangeset, Debug)]
|
||||
|
@ -85,7 +88,11 @@ impl Blog {
|
|||
if instance.local {
|
||||
inserted.fqn = iri_percent_encode_seg(&inserted.actor_id.clone());
|
||||
} else {
|
||||
inserted.fqn = format!("{}@{}", iri_percent_encode_seg(&inserted.actor_id), instance.public_domain);
|
||||
inserted.fqn = format!(
|
||||
"{}@{}",
|
||||
iri_percent_encode_seg(&inserted.actor_id),
|
||||
instance.public_domain
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -937,7 +937,10 @@ impl FromId<DbConn> for User {
|
|||
.to_string();
|
||||
|
||||
if username.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) {
|
||||
tracing::error!("preferredUsername includes invalid character(s): {}", &username);
|
||||
tracing::error!(
|
||||
"preferredUsername includes invalid character(s): {}",
|
||||
&username
|
||||
);
|
||||
return Err(Error::InvalidValue);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue