From a1f0fc16913603f8a9349b72cfcb8b48feb26205 Mon Sep 17 00:00:00 2001 From: Shashank Verma Date: Sun, 24 Sep 2023 13:43:42 +0530 Subject: [PATCH] security: Fix authorization on contextPath Signed-off-by: Shashank Verma --- .../moticlubs/web/security/SecurityConfig.kt | 2 +- src/main/resources/secrets.yml.gpg | Bin 585 -> 584 bytes 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/com/mnnit/moticlubs/web/security/SecurityConfig.kt b/src/main/kotlin/com/mnnit/moticlubs/web/security/SecurityConfig.kt index 77512b7..6dd14b0 100644 --- a/src/main/kotlin/com/mnnit/moticlubs/web/security/SecurityConfig.kt +++ b/src/main/kotlin/com/mnnit/moticlubs/web/security/SecurityConfig.kt @@ -111,7 +111,7 @@ class SecurityConfig( .map { "$contextPath$it" } .any { reqPath.startsWith(it) } -> Mono.empty() - reqPath.startsWith("/$BASE_PATH") -> if (validSession) { + reqPath.startsWith("$contextPath/$BASE_PATH") -> if (validSession) { Mono.empty() } else { Mono.error(UnauthorizedException("Missing firebase auth token")) diff --git a/src/main/resources/secrets.yml.gpg b/src/main/resources/secrets.yml.gpg index b4351a51963879eb77d585e59577220d6f69362c..b420702cf9ef8a1a1fde9823bbc49035cd696fb5 100644 GIT binary patch literal 584 zcmV-O0=NB)4Fm}T2$YBr5f2=3Vd&E70pYCJrQ}4?pdc!dyA)n!*zq`hA|(wPn8Y!` z9Bc7EL8zCO_csWhNkOV?Vi-x%&dX^p@P6cX91 zQlLLSQ%FI3J_;BX^Y=%Xf*0 z20+%ACK8LdMMM`(s~Vex<}H^XEE}D{8>BA>dy|(KwP27_!dAXluLsYu-x{e z9vHJ;YKH30-S>a?wf9EZ;a?kL<$acOyUJT>2Z=v^M{kxGEoqa9Dd%uJ#oUK-eM>do zDM7Kix~DNUuJUQu0*gCY#A{2Vr<*D+rQh$SeI_;1`}fvo2cjU6_{J(+iOIX^8@s5v z51*hXP8zKY(p|_tH$M5j)x zfCfrKHsL<8Ze-CxKRyitTDT;+E@dkaf7>eDzK05cSL{o8tnyWIUV$cg{a)P75g`!) zGZ(c%`Bwio?*y=BA(JKOoy)3|CZKDH(!OzPOi6UMA literal 585 zcmV-P0=E5(4Fm}T2rG8!vp0oSo#@i(0i?`oIIw!v@@+bOkjQDG=D#UPst8unLQ%sC zu)AP$lwoheh8-#|;bi!qxnq8qMSTQI|8z;foMlIBJB89$td5vq1sXbdC1YjAa`*P| ze%H`ws>Yoo%RFz>xu~X@>lT?V^h6*G78bPULK@Y-j7~NM>-+-H5k^;Pjmo)M7TxT1 zFi~LX7r8ao|NZ6~l$sCN$v$HYkp71!iZSy}O7;_Hl3>Z9(4L}J?klJ-fJws~_&+Qi)57PEkYj*$2R2SY z@AKlty3i2<)XPlRWGQz!*hD>;OBfrAXJ}J(XC;e4L9-FIxs68?h-Poqf__7fx`=MF44ei`& XHPWpXBu>yyqMx`t$s;54qn&JhXuKfO