0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-01-24 07:29:08 -05:00

Protect external links

This commit is contained in:
Andrés Moya 2021-09-29 11:41:29 +02:00
parent 9e5166d991
commit fe4cab3a9e

View file

@ -399,7 +399,9 @@
([uri]
(open-new-window uri "_blank"))
([uri name]
(js/window.open (str uri) name)))
;; Warning: need to protect against reverse tabnabbing attack
;; https://www.comparitech.com/blog/information-security/reverse-tabnabbing/
(.open js/window (str uri) name "noopener,noreferrer")))
(defn browser-back
[]