mirror of
https://github.com/penpot/penpot.git
synced 2025-05-22 19:46:11 +02:00
✨ Review input validation for plugins
This commit is contained in:
parent
c5c8be4b4a
commit
1794859468
12 changed files with 1532 additions and 497 deletions
|
@ -35,7 +35,7 @@
|
|||
(setPluginData
|
||||
[_ key value]
|
||||
(cond
|
||||
(not (string? key))
|
||||
(or (not (string? key)) (empty? key))
|
||||
(u/display-not-valid :file-plugin-data-key key)
|
||||
|
||||
(and (some? value) (not (string? value)))
|
||||
|
@ -66,10 +66,10 @@
|
|||
[_ namespace key value]
|
||||
|
||||
(cond
|
||||
(not (string? namespace))
|
||||
(or (not (string? namespace)) (empty? namespace))
|
||||
(u/display-not-valid :file-plugin-data-namespace namespace)
|
||||
|
||||
(not (string? key))
|
||||
(or (not (string? key)) (empty? key))
|
||||
(u/display-not-valid :file-plugin-data-key key)
|
||||
|
||||
(and (some? value) (not (string? value)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue