From 047e156cfbe9a0794287ebac1768e1677470f94c Mon Sep 17 00:00:00 2001 From: daniel31x13 Date: Wed, 17 Jan 2024 13:02:44 -0500 Subject: [PATCH 1/2] updated version number --- components/SettingsSidebar.tsx | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/SettingsSidebar.tsx b/components/SettingsSidebar.tsx index d4558f8..4fb5763 100644 --- a/components/SettingsSidebar.tsx +++ b/components/SettingsSidebar.tsx @@ -4,7 +4,7 @@ import { useRouter } from "next/router"; import React, { useEffect, useState } from "react"; export default function SettingsSidebar({ className }: { className?: string }) { - const LINKWARDEN_VERSION = "v2.4.8"; + const LINKWARDEN_VERSION = "v2.4.9"; const { collections } = useCollectionStore(); diff --git a/package.json b/package.json index 9700609..a969da6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "linkwarden", - "version": "2.4.8", + "version": "2.4.9", "main": "index.js", "repository": "https://github.com/linkwarden/linkwarden.git", "author": "Daniel31X13 ", From ae3cf104b796a35d31d95c1c68e248b82c22a2bd Mon Sep 17 00:00:00 2001 From: Jan T Date: Mon, 29 Jan 2024 09:49:50 +0100 Subject: [PATCH 2/2] Added environment variable "IGNORE_SSL_ERRORS" to instruct playwright/Chromium to ignore SSL errors; this is useful to support generation of browser screenshots from sources with self-signed certificates or untrusted CAs, but also opens the possibility to index sites with rejected certificates; so it should not be enabled as a default behavior. --- .env.sample | 1 + lib/api/archiveHandler.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.env.sample b/.env.sample index d2a8d60..ad56075 100644 --- a/.env.sample +++ b/.env.sample @@ -20,6 +20,7 @@ MAX_LINKS_PER_USER= ARCHIVE_TAKE_COUNT= BROWSER_TIMEOUT= IGNORE_UNAUTHORIZED_CA= +IGNORE_HTTPS_ERRORS= # AWS S3 Settings SPACES_KEY= diff --git a/lib/api/archiveHandler.ts b/lib/api/archiveHandler.ts index 60ea790..88ff97e 100644 --- a/lib/api/archiveHandler.ts +++ b/lib/api/archiveHandler.ts @@ -21,7 +21,11 @@ const BROWSER_TIMEOUT = Number(process.env.BROWSER_TIMEOUT) || 5; export default async function archiveHandler(link: LinksAndCollectionAndOwner) { const browser = await chromium.launch(); - const context = await browser.newContext(devices["Desktop Chrome"]); + const context = await browser.newContext({ + ...devices["Desktop Chrome"], + ignoreHTTPSErrors: + process.env.IGNORE_HTTPS_ERRORS === "true", + }); const page = await context.newPage(); const timeoutPromise = new Promise((_, reject) => {