-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SVG logo URL embedded in emails return SVG content, despite useSvg=0 #13895
Comments
Is the |
@danielkesselberg Which extension? An app? |
Do you see the notice above? |
The docker container is based on nextcloud:apache. The notice above is displayed, but not highlighted, so I missed it. What needs to be done to enable the extension? |
Ah. |
I installed libmagickcore-6.q16-3-extra and I also get a favicon based on the logo (which is unreadable, BTW). But when requesting https://cloud.grossweber.com/apps/theming/image/logo?useSvg=0&v=24 I still get SVG contents. |
I don't know if libmagickcore*-extra must be added before compiling imagemagick. |
Yes. A custom dockerfile is the way to go. There are concerns about the security of |
I added libmagickcore*-extra via apt in a custom Dockerfile. ImageMagick was already installed via nextcloud:apache (my base image). I noticed a slight change in UI after adding the libmagickcore*-extra package which seems to be related to the SVG support being present. The favicon changes depending on the app I'm using:
From my perspective Nextcloud's image handling capabilities have been extended after adding the package via apt, without requiring to actually compile ImageMagick again. |
|
$ curl "https://cloud.grossweber.com/apps/theming/image/logo?useSvg=0&v=24"
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 303.11 59.689"><path fill="#ffffff"
... Correct Content-Type, but contents are SVG. |
The icon files are not regenerated automatically if the additional imagemagick package is installed, so you need to change some value of the theming app in order to trigger a rebuild of the icons. |
I removed the custom logo and added the one I downloaded before. The now-current URL is https://cloud.grossweber.com/apps/theming/image/logo?useSvg=0&v=27 and it's still returned as SVG. Is deleting + adding not enough of a change? |
I also tried changing the Color value, still SVG. https://cloud.grossweber.com/apps/theming/image/logo?useSvg=0&v=29 |
The problem is that ImageMagick rejects SVG without XML declaration. The class |
@PalmtopTiger Yep, adding the XML declaration and reuploading fixed it. Thanks for the pointer in the right direction! Should we leave this issue open to track a general fix for the future? |
Something like that could work. But does that make sense? There is no conversion from png to svg. Just the Content-Type header is changed. It seems to me that something else is broken. A request with useSvg=0 should not return a svg. cc @juliushaertl 😕 |
Paging Dr @juliushaertl 📟 |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Marking issues stale does not solve them. |
@agross but it ping everyone mentioned and make sure it's not forgotten ;) |
I'd say we should rather check during upload of the logo if imagick actually considers it a valid svg than manually rewriting it as in the patch from #13895 (comment) |
This issue has been automatically marked as stale because it has not had recent activity and seems to be missing some essential information. It will be closed if no further activity occurs. Thank you for your contributions. |
Again, not gone stale. |
The problem still occurs in Nextcloud v23.0.2 |
The problem still occurs in Nextcloud Hub 3 (25.0.1) |
Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you! |
The logo I uploaded to Nextcloud via the Theming section is returned as SVG. The URL embedded in the mail template is: https://cloud.grossweber.com/apps/theming/image/logo?useSvg=0&v=21
Steps to reproduce
Expected behaviour
Logo should be displayed
Actual behaviour
I get the broken image placeholder
Server configuration
Operating system: Linux/docker
Web server: nginx
Database: MariaDB
PHP version: 7.2.14
Nextcloud version: 15.0.2
Updated from an older Nextcloud/ownCloud or fresh install: oC 10 -> NC 12, 13, 14, 15. After that to logo was added.
Where did you install Nextcloud from: docker
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: No
Are you using encryption: No
Are you using an external user-backend, if yes which one: No
Logs
Web server log
Web server log
Nextcloud log (data/nextcloud.log)
Nextcloud log
The text was updated successfully, but these errors were encountered: