• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved The SVG file … cannot be uploaded: Suspicious node 'svg' (Line: -1)

PierreLannoy

New Pleskian
Server operating system version
Cloudlinux 8.7
Plesk version and microupdate number
18.0.51 Update #1
Hello all!
When I create a new server (I do it via scripts), I'm setting branding options too. From some times now, my script triggers an error on the following command: plesk bin branding --custom-logo -file /tmp/header.svg
After investigation, I found the sanitization that is made by Plesk in such a case doesn't allow svg tags. The error message is The SVG file /tmp/header.svg cannot be uploaded: Suspicious node 'svg' (Line: -1)about… (too bad, svg tag is not allowed in svg files ;) )

Has anyone encountered this and if so how did you solve the problem?

Thanks in advance
 
We know of similar product issue for SVG files documented in Input - Standard .svg file not accepted as favicon file, workaround: place it into directory directly and Input - Standard .svg file not accepted as favicon file, workaround: place it into directory directly

Could you please try to run your file through Optimize SVG Images Online and try again with their output?

If it does not work afterwards, could you please provide your file here publicly or in a private message so that I can forward it to developers?
 
Hello Peter!
Thanks to you (and your remark), I decided to "dive in" a bit to understand why a standard compliant svg file was not correctly used by Plesk in this case.
What I understood after several trials/errors is that the Plesk sanitizer does not allow all options and flags for ?xml and !DOCTYPE tags and, therefore, doesn't fully supports svg dom subtrees.
If you want to understand, just try the following legit two lines:
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
I got it, from now on I will systematically delete these 2 lines (so as not to waste time understanding which tags and attributes trigger the sanitizer error). But I still say that the sanitizer should accept files that strictly conform to the svg format…

Thanks for the help.
 
Back
Top