Skip to content

SSL Certificate Error: Cannot read properties of undefined (reading 'match') #127

Description

@kopertop

When a site has a very bad SSL Certificate, it can cause the following uncaught (and uncatchable) exception:

Cannot read properties of undefined (reading 'match')
node_modules/.pnpm/fetch-h2@3.0.2/node_modules/fetch-h2/dist/lib/san.js33:39
const regexes = [];
if (cert) {
    getNames(cert).forEach(name => {
        if (name.match(/.*\*.*\*.*/))
            throw new Error(`Invalid CN/subjectAltNames: ${name}`);
        if (name.includes("*"))
            regexes.push(new RegExp(makeRegex(name)));

Current example: https://kawvalleyeaglesday.com

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions