Skip to content

Commit ae0f1d5

Browse files
author
Chetan Padia
committed
allow redirect-uri with no query parameters in ring wrapper
1 parent 9adcd00 commit ae0f1d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/clj_oauth2/ring.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ create a vector of values."
115115
"Returns true if this is a request to the callback URL"
116116
(let [oauth2-url-vector (string/split (.toString (java.net.URI. (:redirect-uri oauth2-params))) #"\?")
117117
oauth2-uri (nth oauth2-url-vector 0)
118-
oauth2-url-params (nth oauth2-url-vector 1)
118+
oauth2-url-params (or (get oauth2-url-vector 1) "")
119119
encoding (or (:character-encoding request) "UTF-8")]
120120
(and (= oauth2-uri (request-uri request oauth2-params))
121121
(submap? (keyify-params (parse-params oauth2-url-params encoding)) (:params request)))))

0 commit comments

Comments
 (0)