Format
This commit is contained in:
parent
699fdc30d9
commit
3580fb04fa
@ -18,11 +18,14 @@ use openssl::{
|
||||
rsa::Rsa,
|
||||
sign::{Signer, Verifier},
|
||||
};
|
||||
use plume_common::{activity_pub::{
|
||||
use plume_common::{
|
||||
activity_pub::{
|
||||
inbox::{AsActor, FromId},
|
||||
sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source, SourceProperty,
|
||||
ToAsString, ToAsUri,
|
||||
}, utils::iri_percent_encode_seg};
|
||||
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 New Issue
Block a user