From fee2eea87c915fb58d53577fdc220e6b88bcc574 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Fri, 20 Dec 2019 22:54:58 +0100 Subject: [PATCH] :bug: Properly send 403 on not authorized request. --- backend/src/uxbox/http/session.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/uxbox/http/session.clj b/backend/src/uxbox/http/session.clj index 7dad11bdb..f85b12867 100644 --- a/backend/src/uxbox/http/session.clj +++ b/backend/src/uxbox/http/session.clj @@ -56,7 +56,7 @@ (spx/terminate (assoc data ::unauthorized true))))) (vc/handle-on-context)))) :leave (fn [data] - (if (and (::unauthorized data) (:response data)) + (if (::unauthorized data) (update data :response assoc :status 403 :body {:type :authentication :code :unauthorized})