From c8ef6bae1ad55eb5fb4c6ded787dc92ba4722a2d Mon Sep 17 00:00:00 2001 From: Manuel <30572287+manuel-rw@users.noreply.github.com> Date: Fri, 3 Mar 2023 20:27:30 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=91=20Fix=20URL=20malformed=20(#743)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- src/middleware.ts | 6 +-- yarn.lock | 127 ++++++++++++++++++++++++---------------------- 3 files changed, 69 insertions(+), 66 deletions(-) diff --git a/package.json b/package.json index c398dc5cc..b64160f85 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "html-entities": "^2.3.3", "i18next": "^21.9.1", "js-file-download": "^0.4.12", - "next": "^13.1.6", + "next": "^13.2.1", "next-i18next": "^11.3.0", "nzbget-api": "^0.0.3", "prismjs": "^1.29.0", diff --git a/src/middleware.ts b/src/middleware.ts index 79f85b693..6652e8d41 100644 --- a/src/middleware.ts +++ b/src/middleware.ts @@ -1,8 +1,8 @@ -import { NextFetchEvent, NextRequest, NextResponse } from 'next/server'; +import { NextRequest, NextResponse } from 'next/server'; -// eslint-disable-next-line consistent-return -export function middleware(req: NextRequest, ev: NextFetchEvent) { +export function middleware(req: NextRequest) { const { cookies } = req; + // Don't even bother with the middleware if there is no defined password if (!process.env.PASSWORD) return NextResponse.next(); diff --git a/yarn.lock b/yarn.lock index 2d3338ba5..aa12f8a2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1272,10 +1272,10 @@ __metadata: languageName: node linkType: hard -"@next/env@npm:13.1.6": - version: 13.1.6 - resolution: "@next/env@npm:13.1.6" - checksum: 0f911a18f0b3372007632fffa87f5d7f802c00d07b3bf757d2d09574735ae43f60000ecdf64b6f06e195971c508c2bcee82dd1e3aab27a08a4300eb0317652bb +"@next/env@npm:13.2.1": + version: 13.2.1 + resolution: "@next/env@npm:13.2.1" + checksum: 16a877479348b9d6a9e69e74312546889d6419a6dec0556cf7d9ed5876b4f69a0974c804f2c5ec81526522c243d97bd2d6919d3241cd165e10e8fd6c3bb4b975 languageName: node linkType: hard @@ -1288,93 +1288,93 @@ __metadata: languageName: node linkType: hard -"@next/swc-android-arm-eabi@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-android-arm-eabi@npm:13.1.6" +"@next/swc-android-arm-eabi@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-android-arm-eabi@npm:13.2.1" conditions: os=android & cpu=arm languageName: node linkType: hard -"@next/swc-android-arm64@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-android-arm64@npm:13.1.6" +"@next/swc-android-arm64@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-android-arm64@npm:13.2.1" conditions: os=android & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-arm64@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-darwin-arm64@npm:13.1.6" +"@next/swc-darwin-arm64@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-darwin-arm64@npm:13.2.1" conditions: os=darwin & cpu=arm64 languageName: node linkType: hard -"@next/swc-darwin-x64@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-darwin-x64@npm:13.1.6" +"@next/swc-darwin-x64@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-darwin-x64@npm:13.2.1" conditions: os=darwin & cpu=x64 languageName: node linkType: hard -"@next/swc-freebsd-x64@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-freebsd-x64@npm:13.1.6" +"@next/swc-freebsd-x64@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-freebsd-x64@npm:13.2.1" conditions: os=freebsd & cpu=x64 languageName: node linkType: hard -"@next/swc-linux-arm-gnueabihf@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-linux-arm-gnueabihf@npm:13.1.6" +"@next/swc-linux-arm-gnueabihf@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-linux-arm-gnueabihf@npm:13.2.1" conditions: os=linux & cpu=arm languageName: node linkType: hard -"@next/swc-linux-arm64-gnu@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-linux-arm64-gnu@npm:13.1.6" +"@next/swc-linux-arm64-gnu@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-linux-arm64-gnu@npm:13.2.1" conditions: os=linux & cpu=arm64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-arm64-musl@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-linux-arm64-musl@npm:13.1.6" +"@next/swc-linux-arm64-musl@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-linux-arm64-musl@npm:13.2.1" conditions: os=linux & cpu=arm64 & libc=musl languageName: node linkType: hard -"@next/swc-linux-x64-gnu@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-linux-x64-gnu@npm:13.1.6" +"@next/swc-linux-x64-gnu@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-linux-x64-gnu@npm:13.2.1" conditions: os=linux & cpu=x64 & libc=glibc languageName: node linkType: hard -"@next/swc-linux-x64-musl@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-linux-x64-musl@npm:13.1.6" +"@next/swc-linux-x64-musl@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-linux-x64-musl@npm:13.2.1" conditions: os=linux & cpu=x64 & libc=musl languageName: node linkType: hard -"@next/swc-win32-arm64-msvc@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-win32-arm64-msvc@npm:13.1.6" +"@next/swc-win32-arm64-msvc@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-win32-arm64-msvc@npm:13.2.1" conditions: os=win32 & cpu=arm64 languageName: node linkType: hard -"@next/swc-win32-ia32-msvc@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-win32-ia32-msvc@npm:13.1.6" +"@next/swc-win32-ia32-msvc@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-win32-ia32-msvc@npm:13.2.1" conditions: os=win32 & cpu=ia32 languageName: node linkType: hard -"@next/swc-win32-x64-msvc@npm:13.1.6": - version: 13.1.6 - resolution: "@next/swc-win32-x64-msvc@npm:13.1.6" +"@next/swc-win32-x64-msvc@npm:13.2.1": + version: 13.2.1 + resolution: "@next/swc-win32-x64-msvc@npm:13.2.1" conditions: os=win32 & cpu=x64 languageName: node linkType: hard @@ -4990,7 +4990,7 @@ __metadata: i18next: ^21.9.1 jest: ^28.1.3 js-file-download: ^0.4.12 - next: ^13.1.6 + next: ^13.2.1 next-i18next: ^11.3.0 nzbget-api: ^0.0.3 prettier: ^2.7.1 @@ -6697,29 +6697,30 @@ __metadata: languageName: node linkType: hard -"next@npm:^13.1.6": - version: 13.1.6 - resolution: "next@npm:13.1.6" +"next@npm:^13.2.1": + version: 13.2.1 + resolution: "next@npm:13.2.1" dependencies: - "@next/env": 13.1.6 - "@next/swc-android-arm-eabi": 13.1.6 - "@next/swc-android-arm64": 13.1.6 - "@next/swc-darwin-arm64": 13.1.6 - "@next/swc-darwin-x64": 13.1.6 - "@next/swc-freebsd-x64": 13.1.6 - "@next/swc-linux-arm-gnueabihf": 13.1.6 - "@next/swc-linux-arm64-gnu": 13.1.6 - "@next/swc-linux-arm64-musl": 13.1.6 - "@next/swc-linux-x64-gnu": 13.1.6 - "@next/swc-linux-x64-musl": 13.1.6 - "@next/swc-win32-arm64-msvc": 13.1.6 - "@next/swc-win32-ia32-msvc": 13.1.6 - "@next/swc-win32-x64-msvc": 13.1.6 + "@next/env": 13.2.1 + "@next/swc-android-arm-eabi": 13.2.1 + "@next/swc-android-arm64": 13.2.1 + "@next/swc-darwin-arm64": 13.2.1 + "@next/swc-darwin-x64": 13.2.1 + "@next/swc-freebsd-x64": 13.2.1 + "@next/swc-linux-arm-gnueabihf": 13.2.1 + "@next/swc-linux-arm64-gnu": 13.2.1 + "@next/swc-linux-arm64-musl": 13.2.1 + "@next/swc-linux-x64-gnu": 13.2.1 + "@next/swc-linux-x64-musl": 13.2.1 + "@next/swc-win32-arm64-msvc": 13.2.1 + "@next/swc-win32-ia32-msvc": 13.2.1 + "@next/swc-win32-x64-msvc": 13.2.1 "@swc/helpers": 0.4.14 caniuse-lite: ^1.0.30001406 postcss: 8.4.14 styled-jsx: 5.1.1 peerDependencies: + "@opentelemetry/api": ^1.4.0 fibers: ">= 3.1.0" node-sass: ^6.0.0 || ^7.0.0 react: ^18.2.0 @@ -6753,6 +6754,8 @@ __metadata: "@next/swc-win32-x64-msvc": optional: true peerDependenciesMeta: + "@opentelemetry/api": + optional: true fibers: optional: true node-sass: @@ -6761,7 +6764,7 @@ __metadata: optional: true bin: next: dist/bin/next - checksum: 584977e382bd826c21e7fc5f67bca50e4d95741a854b1686394d45331404479c7266569671227421975fc18e5cf70769a4ad7edede7450d4497213205bba77c8 + checksum: 2dba145ef4d604cd8eadc27f9e5a537df799614d1a801b9161a997f77a432684871eae51642580972a80ef363d724789677ae7c5fe44dc3dd66e71cd43f609c8 languageName: node linkType: hard