So on my ONI instance that I've been use as an alternative fediverse profile for myself for about two years, the full storage used is about 3.4G, but out of that there's 2.5G containing mostly the Delete activities of mastodon.social. Crazy.
@silverpill to come back to this, I have added both this example and one of your original requests to the unit-tests, and they both validate correctly.
So I still have no idea why this is failing in production. The only thing I can think of is the http proxy messing with the value of the "target-uri" parameter.
Would it be too much trouble for you to create a minimum example that generates a signature using your libraries so I can adapt it to test on my dev setup?
@silverpill damn, I didn't have debugging enabled after restarting the server. I found the request, but the errors are not very enlightening on signature check failure.
@david_chisnall as far as I remember Firefox also bundles an LLM with the install (useful at least for in browser translations) but it still manages to keep the size reasonable...
@silverpill when you get a chance, please send another request. While waiting for the upstream to solve the issue, I fixed on my end trying to validate missing nonces.
@evan if you want the simplest mechanism to upload media, why bother with multipart request bodies? Just do what I do in BOX->ONI, use a data URI for encoding the binary, either as Object.Content or Object.URL.
Can you tell me what's the difference between a request containing JSON with a data URI property and a multipart request body?
As far as I can tell the binary data is in both cases base64 encoded, so you're not saving on size, it can be malformed for both cases (but for multipart you now you need an extra check to not save the JSON-LD object if the bin-data is broken), etc...
As always it's the Clients that are responsible for addressing, therefore the second step should cover it, if the user/client chooses to perform it.
> 2) What happens if the client doesn't post the `Create` activity?
Whatever the server desires: cleanup after a while, keeping the media, etc. Why do you think it's relevant for the specification itself?
ActivityPub, to my reading, is not about how to *store* content, but about how to *distribute* content. So after it was uploaded, it's no longer the concern of the spec, unless operated further through other ActivityPub requests.
@evan to clarify for 1): before the Create is performed, and the media object gets created on the server, the binary data itself is not accessible/referenceable.
@hongminhee like I mentioned in a thread where Evan and Reiver were talking about this, I think having a mediaUpload that has a very similar behaviour to an inbox/outbox, but with one **small** changed detail is a bad API.
I would prefer there's either a two step process: upload media first, use resulting token in an object create, or use the outbox with for the binary data upload directly... The first one seems saner to me.
@silverpill the problem is missing nonces even when not specified in the signature-input.
6:33PM WRN Failed to load actor err="verification failed: parameter error: nonce validation failed: nonce already seen" log=auth
I'll review if the error is on my end, or in the library itself. I just realized this is the same issue I had with signatures coming from tags.pub at some point.
I'll probably message you with an update sometime tomorrow. Thank you for giving it a try. 🫡
Mostly a programmer.Implementing #ActivityPub in the #Go programming language.Current projects: * #GoActivityPub - a library to use ActivityPub in Go. * #FedBOX - a generic ActivityPub service supporting the client to server API. * #brutalinks - a link aggregator inspired by (old) reddit, hacker news and lobste.rs built on top of FedBOX. * #oni - a single user ActivityPub server with minimal fuss.My posts are mostly related to ActivityPub and web development.