Repository navigation
SVG logo URL embedded in emails return SVG content, despite useSvg=0 #13895
Copy link
Copy link
Closed
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapbugfeature: themingneeds info
Description
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
$ curl 'https://cloud.grossweber.com/apps/theming/image/logo?useSvg=0&v=21'
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 303.11 59.689">...Steps to reproduce
- Add SVG logo via Theming
- Send email (Activity Notification in my case)
- Open in Gmail or Spark (in my case)
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
Enabled:
- accessibility: 1.1.0
- activity: 2.8.2
- admin_audit: 1.5.0
- bruteforcesettings: 1.3.0
- camerarawpreviews: 0.6.3
- checksum: 0.4.2
- cloud_federation_api: 0.1.0
- comments: 1.5.0
- dav: 1.8.1
- federatedfilesharing: 1.5.0
- federation: 1.5.0
- files: 1.10.0
- files_external: 1.6.0
- files_fulltextsearch: 1.2.3
- files_pdfviewer: 1.4.0
- files_rightclick: 0.11.0
- files_sharing: 1.7.0
- files_texteditor: 2.7.0
- files_trashbin: 1.5.0
- files_versions: 1.8.0
- files_videoplayer: 1.4.0
- firstrunwizard: 2.4.0
- fulltextsearch: 1.2.3
- fulltextsearch_elasticsearch: 1.2.2
- gallery: 18.2.0
- impersonate: 1.2.0
- logreader: 2.0.0
- lookup_server_connector: 1.3.0
- nextcloud_announcements: 1.4.0
- notifications: 2.3.0
- oauth2: 1.3.0
- password_policy: 1.5.0
- provisioning_api: 1.5.0
- serverinfo: 1.5.0
- sharebymail: 1.5.0
- support: 1.0.0
- survey_client: 1.3.0
- systemtags: 1.5.0
- theming: 1.6.0
- twofactor_backupcodes: 1.4.1
- twofactor_totp: 2.1.0
- updatenotification: 1.5.0
- workflowengine: 1.5.0
Disabled:
- encryption
- user_ldap
Nextcloud configuration:
Config report
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"version": "15.0.2.0",
"installed": true,
"maintenance": false,
"singleuser": false,
"htaccess.RewriteBase": "\/",
"memcache.local": "\\OC\\Memcache\\APCu",
"apps_paths": [
{
"path": "\/var\/www\/html\/apps",
"url": "\/apps",
"writable": false
},
{
"path": "\/var\/www\/html\/custom_apps",
"url": "\/custom_apps",
"writable": true
}
],
"dbtype": "mysql",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"owncloud.home.therightstuff.de",
"cloud.grossweber.com"
],
"overwrite.cli.url": "https:\/\/owncloud.home.therightstuff.de",
"loglevel": 2,
"logtimezone": "Europe\/Berlin",
"log_rotate_size": 10485760,
"log_rotate_sizerotation": 3,
"mail_smtpmode": "smtp",
"mail_from_address": "***REMOVED SENSITIVE VALUE***",
"mail_domain": "***REMOVED SENSITIVE VALUE***",
"mail_smtphost": "***REMOVED SENSITIVE VALUE***",
"mail_smtpport": "587",
"mail_smtpsecure": "tls",
"mail_smtpauthtype": "LOGIN",
"mail_smtpauth": 1,
"mail_smtpname": "***REMOVED SENSITIVE VALUE***",
"mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
"skeletondirectory": "",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "***REMOVED SENSITIVE VALUE***",
"port": 6379,
"password": "***REMOVED SENSITIVE VALUE***"
},
"trashbin_retention_obligation": "auto, 30",
"versions_retention_obligation": "auto, 3",
"trusted_proxies": "***REMOVED SENSITIVE VALUE***",
"data-fingerprint": "68bc4c4bc6106a1c8c88e19ad0230ab7"
}
}
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
"GET /apps/theming/image/logo?useSvg=0&v=21 HTTP/1.1" 200 10336 "-" "Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko Firefox/11.0 (via ggpht.com GoogleImageProxy)"
Nextcloud log (data/nextcloud.log)
Nextcloud log
Nothing of relevance
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
0. Needs triagePending check for reproducibility or if it fits our roadmapPending check for reproducibility or if it fits our roadmapbugfeature: themingneeds info
Activity
kesselb commentedon Jan 29, 2019
Is the
ImageMagickextension installed and enabled? If not the conversion is not possible.agross commentedon Jan 29, 2019
@danielkesselberg Which extension? An app?
kesselb commentedon Jan 29, 2019
ImageMagickis a extension for php similar toGDbut with support for SVG. If you are using the nextcloud/docke image this extension should be present (https://github.com/nextcloud/docker/blob/250802c70679b72457e1b85f301e1a503517f780/15.0/apache/Dockerfile#L65).Do you see the notice above?
agross commentedon Jan 29, 2019
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?
kesselb commentedon Jan 29, 2019
Ah.
ImageMagickis included but without svg support. nextcloud/docker#594 should do the trick. I'm closing this here.agross commentedon Jan 30, 2019
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.
fuse314 commentedon Feb 1, 2019
I don't know if libmagickcore*-extra must be added before compiling imagemagick.
You can see the supported formats by imagemagick in
phpinfo()( search forImageMagick supported formats). It should display the SVG type there...kesselb commentedon Feb 1, 2019
Yes. A custom dockerfile is the way to go. There are concerns about the security of
ImageMagick#13099. I understand this is a bit frustrating for new users 😞agross commentedon Feb 1, 2019
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.
kesselb commentedon Feb 3, 2019
agross commentedon Feb 3, 2019
Correct Content-Type, but contents are SVG.
kesselb commentedon Feb 3, 2019
@juliushaertl 🤔
17 remaining items
agross commentedon Jun 14, 2020
Again, not gone stale.
kbzowski commentedon Feb 25, 2022
The problem still occurs in Nextcloud v23.0.2
#26871 looks like good solution but needs to be adapted to the current version.
ChristianKrausse commentedon Dec 8, 2022
The problem still occurs in Nextcloud Hub 3 (25.0.1)
szaimen commentedon Jan 9, 2023
Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!