fix(federation): enforce local-only provider share nodes

This commit is contained in:
sagit
2026-02-10 06:21:02 +00:00
parent 2affb31b3e
commit 00079ac7af
3 changed files with 116 additions and 16 deletions
@@ -132,6 +132,10 @@ func (h *Handler) federationShareCreate(w http.ResponseWriter, r *http.Request)
response.WriteJSON(w, response.ErrDefault("Node not found"))
return
}
if node.IsRemote == 1 {
response.WriteJSON(w, response.ErrDefault("Only local nodes can be shared"))
return
}
now := time.Now().UnixMilli()
token := randomToken(32)