mirror of
https://git.joinplu.me/Plume/Plume.git
synced 2024-11-22 19:41:03 +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,
|
rsa::Rsa,
|
||||||
sign::{Signer, Verifier},
|
sign::{Signer, Verifier},
|
||||||
};
|
};
|
||||||
use plume_common::{activity_pub::{
|
use plume_common::{
|
||||||
|
activity_pub::{
|
||||||
inbox::{AsActor, FromId},
|
inbox::{AsActor, FromId},
|
||||||
sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source, SourceProperty,
|
sign, ActivityStream, ApSignature, CustomGroup, Id, IntoId, PublicKey, Source,
|
||||||
ToAsString, ToAsUri,
|
SourceProperty, ToAsString, ToAsUri,
|
||||||
}, utils::iri_percent_encode_seg};
|
},
|
||||||
|
utils::iri_percent_encode_seg,
|
||||||
|
};
|
||||||
use webfinger::*;
|
use webfinger::*;
|
||||||
|
|
||||||
#[derive(Queryable, Identifiable, Clone, AsChangeset, Debug)]
|
#[derive(Queryable, Identifiable, Clone, AsChangeset, Debug)]
|
||||||
|
@ -85,7 +88,11 @@ impl Blog {
|
||||||
if instance.local {
|
if instance.local {
|
||||||
inserted.fqn = iri_percent_encode_seg(&inserted.actor_id.clone());
|
inserted.fqn = iri_percent_encode_seg(&inserted.actor_id.clone());
|
||||||
} else {
|
} 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();
|
.to_string();
|
||||||
|
|
||||||
if username.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) {
|
if username.contains(&['<', '>', '&', '@', '\'', '"', ' ', '\t'][..]) {
|
||||||
tracing::error!("preferredUsername includes invalid character(s): {}", &username);
|
tracing::error!(
|
||||||
|
"preferredUsername includes invalid character(s): {}",
|
||||||
|
&username
|
||||||
|
);
|
||||||
return Err(Error::InvalidValue);
|
return Err(Error::InvalidValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue