mirror of
https://github.com/penpot/penpot.git
synced 2025-08-06 09:28:26 +02:00
✨ Improve webhook URI validation
This commit is contained in:
parent
6a7a25121e
commit
6ea0279c9e
9 changed files with 34 additions and 14 deletions
|
@ -620,7 +620,7 @@
|
|||
;; WEBHOOKS SECTION
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
||||
(s/def ::uri ::us/not-empty-string)
|
||||
(s/def ::uri ::us/uri)
|
||||
(s/def ::mtype ::us/not-empty-string)
|
||||
(s/def ::webhook-form
|
||||
(s/keys :req-un [::uri ::mtype]))
|
||||
|
@ -657,6 +657,8 @@
|
|||
(let [message (cond
|
||||
(= hint "unknown")
|
||||
(tr "errors.webhooks.unexpected")
|
||||
(= hint "invalid-uri")
|
||||
(tr "errors.webhooks.invalid-uri")
|
||||
(= hint "ssl-validation-error")
|
||||
(tr "errors.webhooks.ssl-validation")
|
||||
(= hint "timeout")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue