forked from alemi/upub
fix: can only update self
This commit is contained in:
parent
2d08511e05
commit
105b829e32
1 changed files with 3 additions and 0 deletions
|
@ -259,6 +259,9 @@ pub async fn update(ctx: &crate::Context, activity: impl apb::Activity, tx: &Dat
|
||||||
|
|
||||||
match object_node.object_type()? {
|
match object_node.object_type()? {
|
||||||
apb::ObjectType::Actor(_) => {
|
apb::ObjectType::Actor(_) => {
|
||||||
|
if oid != actor_id {
|
||||||
|
return Err(ProcessorError::Unauthorized);
|
||||||
|
}
|
||||||
let internal_uid = crate::model::actor::Entity::ap_to_internal(&oid, tx)
|
let internal_uid = crate::model::actor::Entity::ap_to_internal(&oid, tx)
|
||||||
.await?
|
.await?
|
||||||
.ok_or(ProcessorError::Incomplete)?;
|
.ok_or(ProcessorError::Incomplete)?;
|
||||||
|
|
Loading…
Reference in a new issue