KamoCRM

Query avatar_photos extension via SQL instead of Hibernate proxy

FixSecurityService
Shipped
30 மார்ச், 2026 அன்று 4:33 AM UTC
Author
Kamo
Commit
973ee81

avatarRepository.findById() returns a Hibernate proxy (Avatar$HibernateProxy) that fails instanceof AvatarPhoto check. This caused the file extension to always default to 'png' even when the actual file is 'jpg'. The avatar URL was https://.../{hash}.png but the file was stored as {hash}.jpg — resulting in 404 for every avatar image in kamo-meet. Now queries avatar_photos.file_extension directly via JdbcTemplate, bypassing the Hibernate proxy entirely.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing