Open matrixbot opened 3 weeks ago
This comment was originally posted by @ShadowJonathan at https://github.com/matrix-org/dendrite/issues/1994#issuecomment-908255352.
I'm pretty sure the EOF fallthrough here and the overwriting of err
later down there is causing some logic errors;
https://github.com/matrix-org/dendrite/blob/802f1c96f804f7a146e4e12e25b20c980a6af870/mediaapi/fileutils/fileutils.go#L133
This issue was originally created by @ShadowJonathan at https://github.com/matrix-org/dendrite/issues/1994.
Background information
221ed52
go version
: Go 1.17Homeserver in question is
jp.cube64128.xyz
These same symptoms are present on
dendrite.matrix.org
Description
Dendrite returns a confusing error message to non-existent media;
{"errcode":"M_NOT_FOUND","error":"Failed to download: fileutils.GetPathFromBase64Hash: Invalid filePath (Base64Hash too short - min 3 characters): \"\""}
this MXC is valid, while this one isn't, replacing the latter with
matrix.org
or any synapse server returns a proper message of "not found"