Fix invalid Date HTTP header when signing fetch requests #619
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#619
Loading…
Reference in a new issue
No description provided.
Delete branch "Clovis/akkoma:fix-503"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fix #503
While trying to follow a relay, I encountered the same error. I was able to mitigate it by deactivating the
ActivityPub.SignObjectFetch
setting.From what I understand, this bug is encountered on non-english servers because of those lines:
https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/object/fetcher.ex#L271-L276
https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/object/fetcher.ex#L230-L236
https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/signature.ex#L78-L80
Having the
Pleroma.Config.get([:activitypub, :sign_object_fetches])
set to true cause the server to add aDate
header on its requests. However, it seems that this date is translated at some point (probably following OS locale settings). On my config it generateslun., 07 août 2023 10:32:16 GMT
(for monday, 07 august) with "û" not being a valid ASCII char.This bug seems to be rather important since in the current state, we do not follow the Date HTTP header format in some cases: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Date
i was about to type "could you add a test" but apparently we already have one and it would have failed if your locale wasn't EN i guess
funny that nobody found that failure sooner
thanks!