Switch LDAP avatar to store raw JPEG instead of base64-encoded string #157
Loading…
x
Reference in New Issue
Block a user
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?
I'm not sure where we found the information for it being generally stored as base64 string, but I just found out that Gitea only supports the binary format, and the RFC for inetOrgPerson also doesn't mention encoded strings.
Since I only just deployed the version with base64 today, I'll change it asap so we don't announce before it works with Gitea and ejabberd at least.
Switch LDAP avatar to store raw JPEG/PNG instead of base64-encoded stringto Switch LDAP avatar to store raw JPEG instead of base64-encoded stringThis one turns out to be more difficult than I expected. Could use another set of eyes to look at what I have, which isn't working as it should...
I have temporarily hidden the feature by default, so we don't have to care about migrating existing avatars at some point.
I have a working implementation of this in
9e2210c
now, but now I'm not sure it makes sense anymore. There are a few issues with the idea of storing this in LDAP in general, which I'll document here for posterity:So, considering all these points, I think it makes more sense to just use ActiveStorage to store avatars in S3/Garage (or filesystem for smaller akkounts deployments), and then have multiple jobs to update them in services where needed or desired. One of them can be the LDAP one that from abovementioned commit, so it's possible to use it from there also.