镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

SVG logo URL embedded in emails return SVG content, despite useSvg=0 #13895

Closed

Description

@agross

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

  1. Add SVG logo via Theming
  2. Send email (Activity Notification in my case)
  3. 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

Activity

  1. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jan 29, 2019
  2. kesselb commented on Jan 29, 2019

    @kesselb
    Contributor

    Is the ImageMagick extension installed and enabled? If not the conversion is not possible.

  3. agross commented on Jan 29, 2019

    @agross
    Author

    @danielkesselberg Which extension? An app?

  4. kesselb commented on Jan 29, 2019

    @kesselb
    Contributor

    ImageMagick is a extension for php similar to GD but 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).

    image

    Do you see the notice above?

  5. agross commented on Jan 29, 2019

    @agross
    Author

    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?

  6. kesselb commented on Jan 29, 2019

    @kesselb
    Contributor

    Ah. ImageMagick is included but without svg support. nextcloud/docker#594 should do the trick. I'm closing this here.

  7. agross commented on Jan 30, 2019

    @agross
    Author

    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.

  8. fuse314 commented on Feb 1, 2019

    @fuse314

    I don't know if libmagickcore*-extra must be added before compiling imagemagick.
    You can see the supported formats by imagemagick in phpinfo() ( search for ImageMagick supported formats ). It should display the SVG type there...

  9. kesselb commented on Feb 1, 2019

    @kesselb
    Contributor

    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 ImageMagick #13099. I understand this is a bit frustrating for new users 😞

  10. agross commented on Feb 1, 2019

    @agross
    Author

    I don't know if libmagickcore*-extra must be added before compiling imagemagick.

    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:

    • When I browse Files, I see the Files app icon (a folder) instead of Nextcoud's favicon (three circles),
    • for Activity I see the bolt icon
    • etc.

    From my perspective Nextcloud's image handling capabilities have been extended after adding the package via apt, without requiring to actually compile ImageMagick again.

  11. kesselb commented on Feb 3, 2019

    @kesselb
    Contributor
    $ curl -I "https://cloud.grossweber.com/apps/theming/image/logo?useSvg=0&v=24"
    HTTP/2 200 
    content-type: image/png
    content-length: 10336
    
  12. agross commented on Feb 3, 2019

    @agross
    Author
    $ 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.

  13. kesselb commented on Feb 3, 2019

    @kesselb
    Contributor
  14. 17 remaining items

  15. ghost added
    staleTicket or PR with no recent activity
    on Jun 14, 2020
  16. agross commented on Jun 14, 2020

    @agross
    Author

    Again, not gone stale.

  17. ghost removed
    staleTicket or PR with no recent activity
    on Jun 14, 2020
  18. added
    1. to developAccepted and waiting to be taken care of
    and removed
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    on Jul 30, 2020
  19. kbzowski commented on Feb 25, 2022

    @kbzowski

    The problem still occurs in Nextcloud v23.0.2
    #26871 looks like good solution but needs to be adapted to the current version.

  20. ChristianKrausse commented on Dec 8, 2022

    @ChristianKrausse

    The problem still occurs in Nextcloud Hub 3 (25.0.1)

  21. szaimen commented on Jan 9, 2023

    @szaimen
    Contributor

    Hi, please update to 24.0.8 or better 25.0.2 and report back if it fixes the issue. Thank you!

  22. added
    0. Needs triagePending check for reproducibility or if it fits our roadmap
    and removed
    1. to developAccepted and waiting to be taken care of
    on Jan 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions