Skip to content

Commit

Permalink
[fix] [#434] Don't log ring request on missing client id
Browse files Browse the repository at this point in the history
Motivations for change:

  1. Full ring req is an unnecessary amount of info, and may
     produce a lot of log noise.

  2. Sensitive info can be (and often is) in ring requests.

  3. Users can anyway catch the exception which includes the
     request if they really need it.

Thanks to @NoahTheDuke for the report!
  • Loading branch information
ptaoussanis committed Aug 30, 2023
1 parent b746080 commit dbb798a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/taoensso/sente.cljc
Original file line number Diff line number Diff line change
Expand Up @@ -749,8 +749,8 @@
(enc/cond
(str/blank? client-id)
(let [err-msg "Client's Ring request doesn't have a client id. Does your server have the necessary keyword Ring middleware (`wrap-params` & `wrap-keyword-params`)?"]
(timbre/errorf (str err-msg ": %s") ring-req) ; Careful re: % in req
(throw (ex-info err-msg {:ring-req ring-req})))
(timbre/error (str err-msg ": " lid*))
(throw (ex-info err-msg {:ring-req ring-req, :lid lid*})))

:if-let [resp (possible-rejection-resp ring-req)] resp

Expand Down

0 comments on commit dbb798a

Please sign in to comment.