diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index c128eb5fdd..b0933f9f8b 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -47,6 +47,13 @@ jobs: with: languages: ${{ matrix.language }} queries: +security-and-quality + # Inline (not config-file) because init runs in parallel with + # checkout. Test files are not shipped and only add noise. + config: | + paths-ignore: + - '**/*.test.ts' + - '**/*.test.tsx' + - 'cypress/**' - name: Autobuild uses: github/codeql-action/autobuild@v4.39.3 diff --git a/src/components/ResetPassword/index.tsx b/src/components/ResetPassword/index.tsx index 57053e936c..1268282276 100644 --- a/src/components/ResetPassword/index.tsx +++ b/src/components/ResetPassword/index.tsx @@ -101,7 +101,7 @@ const ResetPassword = () => { validationSchema={ResetSchema} onSubmit={async (values) => { const response = await axios.post( - `/api/v1/auth/reset-password/${guid}`, + `/api/v1/auth/reset-password/${encodeURIComponent(String(guid))}`, { password: values.password, } diff --git a/src/pages/collection/[collectionId]/index.tsx b/src/pages/collection/[collectionId]/index.tsx index ff8bbbd898..1ac9be5cb5 100644 --- a/src/pages/collection/[collectionId]/index.tsx +++ b/src/pages/collection/[collectionId]/index.tsx @@ -16,7 +16,7 @@ export const getServerSideProps: GetServerSideProps< CollectionPageProps > = async (ctx) => { const response = await axios.get( - `http://${getHostAndPort()}/api/v1/collection/${ctx.query.collectionId}`, + `http://${getHostAndPort()}/api/v1/collection/${encodeURIComponent(String(ctx.query.collectionId))}`, { headers: ctx.req?.headers?.cookie ? { cookie: ctx.req.headers.cookie } diff --git a/src/pages/movie/[movieId]/index.tsx b/src/pages/movie/[movieId]/index.tsx index 4f0d455c78..616759578f 100644 --- a/src/pages/movie/[movieId]/index.tsx +++ b/src/pages/movie/[movieId]/index.tsx @@ -16,7 +16,7 @@ export const getServerSideProps: GetServerSideProps = async ( ctx ) => { const response = await axios.get( - `http://${getHostAndPort()}/api/v1/movie/${ctx.query.movieId}`, + `http://${getHostAndPort()}/api/v1/movie/${encodeURIComponent(String(ctx.query.movieId))}`, { headers: ctx.req?.headers?.cookie ? { cookie: ctx.req.headers.cookie } diff --git a/src/pages/tv/[tvId]/index.tsx b/src/pages/tv/[tvId]/index.tsx index fae9218414..dc446b2ad8 100644 --- a/src/pages/tv/[tvId]/index.tsx +++ b/src/pages/tv/[tvId]/index.tsx @@ -16,7 +16,7 @@ export const getServerSideProps: GetServerSideProps = async ( ctx ) => { const response = await axios.get( - `http://${getHostAndPort()}/api/v1/tv/${ctx.query.tvId}`, + `http://${getHostAndPort()}/api/v1/tv/${encodeURIComponent(String(ctx.query.tvId))}`, { headers: ctx.req?.headers?.cookie ? { cookie: ctx.req.headers.cookie }