[bug] language setting causes invalid value for header? #503
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#503
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Your setup
OTP
Extra details
No response
Version
3.6.0
PostgreSQL version
14
What were you trying to do?
I try to remote repeat or do any interaction with a post through web UI, for example this one:
then:
What did you expect to happen?
When I input my account ID, it redirects to my instance and the server takes care of it.
What actually happened?
My instance's
ostatus_subscribe
page displays "Error fetching user", and the following error is logged in my service journal.I'm not exactly sure it is caused by BE, FE, or my browser's language settings.
Logs
Severity
I cannot use it as easily as I'd like
Have you searched for this issue?
interesting, i wonder if that's caddy doing weird stuff
curl https://ihatebeinga.live/objects/b3505469-0253-4285-a7e0-7f86d8fa3220 -D- --header "Accept-Language: ja"
seems to throw back a correctly formatted header
hm
Just noticed that when I change my account's interface language (on Akkoma-FE), the error is gone. But now
ostatus_subscribe
returns "Error following account" and still can't repeat that post. This time there seems no error recorded in the journal or the access log.FYI:
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
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
Here is the fix I'll propose in a PR (https://akkoma.dev/AkkomaGang/akkoma/src/branch/develop/lib/pleroma/signature.ex#L78-L80):