Skip to content

Bridge requests without User-Agent => broken media on GtS #1804

@DarkCat09

Description

@DarkCat09

I bridged my GtS account into Bluesky (darkcat09.gts.dc09.ru.ap.brid.gy), but the avatar does not load. After enabling trace loglevel, the following lines related to the avatar media ID (01J1F9...) appeared in logs:

timestamp="26/02/2025 10:11:52.607" func=server.init.func2.Logger.13.1 level=INFO latency="27.504µs" userAgent="" method=GET statusCode=418 path=/fileserver/01MPZ2TE7WTVQM56R37PW0XHX9/attachment/original/01J1F9RZTBBDMYPFYW05XQZV15.png clientIP=38.120.64.66 requestID=3w0hjgcn04001k7ptsg0 msg="I'm a teapot: wrote 58B"

The cause is:

https://github.com/superseriousbusiness/gotosocial/blob/f734a94c1ca9bb732b2ae818098b48794e374c8a/internal/middleware/useragent.go#L28

I'm confident that this request was from Bridgy, because only 38.120.64.66 requested my avatar at the time when I clicked "Update profile" button on fed.brid.gy (however I didn't check in the code if the bridge actually does not send User-Agent).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions