mirror of
https://github.com/pocket-id/pocket-id.git
synced 2025-12-11 07:42:58 +03:00
🐛 Bug Report: Unable to remove or change OIDC Client Logo #181
Reference in New Issue
Block a user
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?
Originally created by @mitchplze on GitHub.
Reproduction steps
Go to an OIDC Client application
Try to Change or Remove the Logo
Expected behavior
The logo should be removed or changed
Actual Behavior
On certain OIDC apps from time to time, the logo removal or change does not 'commit' when you save the page and the logo is effectively stuck/locked.
Even after browser refresh, the old logo is shown on the details and list page.
This doesn't happen all the time, and is often hard to reproduce. Sometimes if you remove the logo, wait a bit, and try to upload a new one it will work.
Version and Environment
Docker. Pocket
v.1.2.0Log Output
When I remove the problematic logo (SVG if it matters), the following panic is logged:
@stonith404 commented on GitHub:
I was able to reproduce the bug that the image can't be deleted. The image did update correctly though.
Is there a possibility that a reverse proxy in front or the browser might cache the image? If you check the
data/uploads/oidc-client-imagesfolder, does the image update correctly?@mitchplze commented on GitHub:
Not sure if you want a separate issue created for this, but could the alignment and size for images be unified as well?
Example:
This logo file is a (small) SVG. It should be rendered as centered horizontal+vertical, and filling the maximum size of the box (as it's a vector).
I believe the same issue happens with PNGs, if the image size is smaller than the box. For rasterized images, at the very least, the image should be center aligned in both directions I think.
@stonith404 commented on GitHub:
Thanks for checking this. Would you mind to test the
ghcr.io/pocket-id/pocket-id:nextimage and let me know if the the alignment of the image is correct now and the image updates correctly?Previously, we didn't set any caching headers for these images, and it seems that the absence of a cache control header is interpreted differently by different browsers. Now images get cached for 15 minutes but for the browser that has updated the image the cache gets invalidated.
@kmendell commented on GitHub:
This is interesting, I tried to reproduce this last night and i couldnt...
@stonith404 Are you able to reproduce?
@mitchplze commented on GitHub:
Looks like my browser was caching the image on the admin screen even after reload, but it was showing up properly during a login flow, and on disk. Strange. A hard cache reload fixed it on admin.
I'm not a web dev, but is there a way to force cache invalidation of the logo when it changes somehow? Perhaps change the underlying URL/guid, which would cause it to be fetched fresh from disk. That would likely require decoupling the client ID from the logo file name though.
@mitchplze commented on GitHub:
Something seems a bit messed up on
:nextfor me. All CSS / page formatting on all pages is gone, and its plain text all smushed to the left now. This is in a regular browser or incog.Switching my compose back to no tag (assuming
:latest) fixes it immediately.@mitchplze commented on GitHub:
Looks like a glitch on my end. I re-pulled and it feels great.
Thanks a ton!
@mitchplze commented on GitHub:
Unfortunately, adding and editing clients altogether is now broken for me, even with incognito.
@stonith404 commented on GitHub:
Sorry, somehow the whole CSS broke in the production build because of a minor issue on one site. Could you try the latest
nextimage again?@stonith404 commented on GitHub:
I can't reproduce this. Is there anything in the logs? What inputs did you enter for creating the client?
@stonith404 commented on GitHub:
Awesome, thanks for the feedback.