🚑 Fix URL malformed (#743)

This commit is contained in:
Manuel
2023-03-03 20:27:30 +01:00
committed by GitHub
parent 457e9cf2bd
commit c8ef6bae1a
3 changed files with 69 additions and 66 deletions

View File

@@ -53,7 +53,7 @@
"html-entities": "^2.3.3", "html-entities": "^2.3.3",
"i18next": "^21.9.1", "i18next": "^21.9.1",
"js-file-download": "^0.4.12", "js-file-download": "^0.4.12",
"next": "^13.1.6", "next": "^13.2.1",
"next-i18next": "^11.3.0", "next-i18next": "^11.3.0",
"nzbget-api": "^0.0.3", "nzbget-api": "^0.0.3",
"prismjs": "^1.29.0", "prismjs": "^1.29.0",

View File

@@ -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) {
export function middleware(req: NextRequest, ev: NextFetchEvent) {
const { cookies } = req; const { cookies } = req;
// Don't even bother with the middleware if there is no defined password // Don't even bother with the middleware if there is no defined password
if (!process.env.PASSWORD) return NextResponse.next(); if (!process.env.PASSWORD) return NextResponse.next();

127
yarn.lock
View File

@@ -1272,10 +1272,10 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@next/env@npm:13.1.6": "@next/env@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/env@npm:13.1.6" resolution: "@next/env@npm:13.2.1"
checksum: 0f911a18f0b3372007632fffa87f5d7f802c00d07b3bf757d2d09574735ae43f60000ecdf64b6f06e195971c508c2bcee82dd1e3aab27a08a4300eb0317652bb checksum: 16a877479348b9d6a9e69e74312546889d6419a6dec0556cf7d9ed5876b4f69a0974c804f2c5ec81526522c243d97bd2d6919d3241cd165e10e8fd6c3bb4b975
languageName: node languageName: node
linkType: hard linkType: hard
@@ -1288,93 +1288,93 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-android-arm-eabi@npm:13.1.6": "@next/swc-android-arm-eabi@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-android-arm-eabi@npm:13.1.6" resolution: "@next/swc-android-arm-eabi@npm:13.2.1"
conditions: os=android & cpu=arm conditions: os=android & cpu=arm
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-android-arm64@npm:13.1.6": "@next/swc-android-arm64@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-android-arm64@npm:13.1.6" resolution: "@next/swc-android-arm64@npm:13.2.1"
conditions: os=android & cpu=arm64 conditions: os=android & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-darwin-arm64@npm:13.1.6": "@next/swc-darwin-arm64@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-darwin-arm64@npm:13.1.6" resolution: "@next/swc-darwin-arm64@npm:13.2.1"
conditions: os=darwin & cpu=arm64 conditions: os=darwin & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-darwin-x64@npm:13.1.6": "@next/swc-darwin-x64@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-darwin-x64@npm:13.1.6" resolution: "@next/swc-darwin-x64@npm:13.2.1"
conditions: os=darwin & cpu=x64 conditions: os=darwin & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-freebsd-x64@npm:13.1.6": "@next/swc-freebsd-x64@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-freebsd-x64@npm:13.1.6" resolution: "@next/swc-freebsd-x64@npm:13.2.1"
conditions: os=freebsd & cpu=x64 conditions: os=freebsd & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-linux-arm-gnueabihf@npm:13.1.6": "@next/swc-linux-arm-gnueabihf@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-linux-arm-gnueabihf@npm:13.1.6" resolution: "@next/swc-linux-arm-gnueabihf@npm:13.2.1"
conditions: os=linux & cpu=arm conditions: os=linux & cpu=arm
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-linux-arm64-gnu@npm:13.1.6": "@next/swc-linux-arm64-gnu@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-linux-arm64-gnu@npm:13.1.6" resolution: "@next/swc-linux-arm64-gnu@npm:13.2.1"
conditions: os=linux & cpu=arm64 & libc=glibc conditions: os=linux & cpu=arm64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-linux-arm64-musl@npm:13.1.6": "@next/swc-linux-arm64-musl@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-linux-arm64-musl@npm:13.1.6" resolution: "@next/swc-linux-arm64-musl@npm:13.2.1"
conditions: os=linux & cpu=arm64 & libc=musl conditions: os=linux & cpu=arm64 & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-linux-x64-gnu@npm:13.1.6": "@next/swc-linux-x64-gnu@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-linux-x64-gnu@npm:13.1.6" resolution: "@next/swc-linux-x64-gnu@npm:13.2.1"
conditions: os=linux & cpu=x64 & libc=glibc conditions: os=linux & cpu=x64 & libc=glibc
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-linux-x64-musl@npm:13.1.6": "@next/swc-linux-x64-musl@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-linux-x64-musl@npm:13.1.6" resolution: "@next/swc-linux-x64-musl@npm:13.2.1"
conditions: os=linux & cpu=x64 & libc=musl conditions: os=linux & cpu=x64 & libc=musl
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-win32-arm64-msvc@npm:13.1.6": "@next/swc-win32-arm64-msvc@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-win32-arm64-msvc@npm:13.1.6" resolution: "@next/swc-win32-arm64-msvc@npm:13.2.1"
conditions: os=win32 & cpu=arm64 conditions: os=win32 & cpu=arm64
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-win32-ia32-msvc@npm:13.1.6": "@next/swc-win32-ia32-msvc@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-win32-ia32-msvc@npm:13.1.6" resolution: "@next/swc-win32-ia32-msvc@npm:13.2.1"
conditions: os=win32 & cpu=ia32 conditions: os=win32 & cpu=ia32
languageName: node languageName: node
linkType: hard linkType: hard
"@next/swc-win32-x64-msvc@npm:13.1.6": "@next/swc-win32-x64-msvc@npm:13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "@next/swc-win32-x64-msvc@npm:13.1.6" resolution: "@next/swc-win32-x64-msvc@npm:13.2.1"
conditions: os=win32 & cpu=x64 conditions: os=win32 & cpu=x64
languageName: node languageName: node
linkType: hard linkType: hard
@@ -4990,7 +4990,7 @@ __metadata:
i18next: ^21.9.1 i18next: ^21.9.1
jest: ^28.1.3 jest: ^28.1.3
js-file-download: ^0.4.12 js-file-download: ^0.4.12
next: ^13.1.6 next: ^13.2.1
next-i18next: ^11.3.0 next-i18next: ^11.3.0
nzbget-api: ^0.0.3 nzbget-api: ^0.0.3
prettier: ^2.7.1 prettier: ^2.7.1
@@ -6697,29 +6697,30 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"next@npm:^13.1.6": "next@npm:^13.2.1":
version: 13.1.6 version: 13.2.1
resolution: "next@npm:13.1.6" resolution: "next@npm:13.2.1"
dependencies: dependencies:
"@next/env": 13.1.6 "@next/env": 13.2.1
"@next/swc-android-arm-eabi": 13.1.6 "@next/swc-android-arm-eabi": 13.2.1
"@next/swc-android-arm64": 13.1.6 "@next/swc-android-arm64": 13.2.1
"@next/swc-darwin-arm64": 13.1.6 "@next/swc-darwin-arm64": 13.2.1
"@next/swc-darwin-x64": 13.1.6 "@next/swc-darwin-x64": 13.2.1
"@next/swc-freebsd-x64": 13.1.6 "@next/swc-freebsd-x64": 13.2.1
"@next/swc-linux-arm-gnueabihf": 13.1.6 "@next/swc-linux-arm-gnueabihf": 13.2.1
"@next/swc-linux-arm64-gnu": 13.1.6 "@next/swc-linux-arm64-gnu": 13.2.1
"@next/swc-linux-arm64-musl": 13.1.6 "@next/swc-linux-arm64-musl": 13.2.1
"@next/swc-linux-x64-gnu": 13.1.6 "@next/swc-linux-x64-gnu": 13.2.1
"@next/swc-linux-x64-musl": 13.1.6 "@next/swc-linux-x64-musl": 13.2.1
"@next/swc-win32-arm64-msvc": 13.1.6 "@next/swc-win32-arm64-msvc": 13.2.1
"@next/swc-win32-ia32-msvc": 13.1.6 "@next/swc-win32-ia32-msvc": 13.2.1
"@next/swc-win32-x64-msvc": 13.1.6 "@next/swc-win32-x64-msvc": 13.2.1
"@swc/helpers": 0.4.14 "@swc/helpers": 0.4.14
caniuse-lite: ^1.0.30001406 caniuse-lite: ^1.0.30001406
postcss: 8.4.14 postcss: 8.4.14
styled-jsx: 5.1.1 styled-jsx: 5.1.1
peerDependencies: peerDependencies:
"@opentelemetry/api": ^1.4.0
fibers: ">= 3.1.0" fibers: ">= 3.1.0"
node-sass: ^6.0.0 || ^7.0.0 node-sass: ^6.0.0 || ^7.0.0
react: ^18.2.0 react: ^18.2.0
@@ -6753,6 +6754,8 @@ __metadata:
"@next/swc-win32-x64-msvc": "@next/swc-win32-x64-msvc":
optional: true optional: true
peerDependenciesMeta: peerDependenciesMeta:
"@opentelemetry/api":
optional: true
fibers: fibers:
optional: true optional: true
node-sass: node-sass:
@@ -6761,7 +6764,7 @@ __metadata:
optional: true optional: true
bin: bin:
next: dist/bin/next next: dist/bin/next
checksum: 584977e382bd826c21e7fc5f67bca50e4d95741a854b1686394d45331404479c7266569671227421975fc18e5cf70769a4ad7edede7450d4497213205bba77c8 checksum: 2dba145ef4d604cd8eadc27f9e5a537df799614d1a801b9161a997f77a432684871eae51642580972a80ef363d724789677ae7c5fe44dc3dd66e71cd43f609c8
languageName: node languageName: node
linkType: hard linkType: hard