Skip to content

Commit

Permalink
Warn on non-string csrf-token arg
Browse files Browse the repository at this point in the history
  • Loading branch information
ptaoussanis committed Jan 12, 2019
1 parent 5a51715 commit f2121e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/taoensso/sente.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -1453,7 +1453,7 @@
(when (not (nil? _deprecated-more-opts)) (warnf "`make-channel-socket-client!` fn signature CHANGED with Sente v0.10.0."))
(when (contains? opts :lp-timeout) (warnf ":lp-timeout opt has CHANGED; please use :lp-timout-ms."))

(when (str/blank? ?csrf-token)
(when (or (not (string? ?csrf-token)) (str/blank? ?csrf-token))
(warnf "WARNING: no CSRF token provided. Connections will FAIL if server-side CSRF check is enabled (as it is by default)."))

(let [packer (coerce-packer packer)
Expand Down

0 comments on commit f2121e2

Please sign in to comment.