mirror of
https://github.com/penpot/penpot.git
synced 2025-06-19 13:41:39 +02:00
🐛 Fix security concern
This commit is contained in:
parent
5c2b5f7cda
commit
216b510900
1 changed files with 6 additions and 5 deletions
|
@ -96,7 +96,8 @@
|
||||||
|
|
||||||
svg-root? (and (map? content) (= tag :svg))
|
svg-root? (and (map? content) (= tag :svg))
|
||||||
svg-tag? (map? content)
|
svg-tag? (map? content)
|
||||||
svg-leaf? (string? content)]
|
svg-leaf? (string? content)
|
||||||
|
valid-tag? (contains? usvg/svg-tags-list tag)]
|
||||||
|
|
||||||
(cond
|
(cond
|
||||||
svg-root?
|
svg-root?
|
||||||
|
@ -104,12 +105,12 @@
|
||||||
(for [item childs]
|
(for [item childs]
|
||||||
[:& shape-wrapper {:shape item :key (dm/str (:id item))}])]
|
[:& shape-wrapper {:shape item :key (dm/str (:id item))}])]
|
||||||
|
|
||||||
svg-tag?
|
(and svg-tag? valid-tag?)
|
||||||
[:& svg-element {:shape shape}
|
[:& svg-element {:shape shape}
|
||||||
(for [item childs]
|
(for [item childs]
|
||||||
[:& shape-wrapper {:shape item :key (dm/str (:id item))}])]
|
[:& shape-wrapper {:shape item :key (dm/str (:id item))}])]
|
||||||
|
|
||||||
svg-leaf?
|
(and svg-leaf? valid-tag?)
|
||||||
content
|
content
|
||||||
|
|
||||||
:else nil))))
|
:else nil))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue