{"record":{"id":"90e7761867c2327e","repo":"santifer/career-ops","slug":"senjob-url-must-use-https-url","errorCode":null,"errorMessage":"senjob: URL must use HTTPS: ${url}","messagePattern":"senjob: URL must use HTTPS: (.+?)","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"providers/senjob.mjs","lineNumber":79,"sourceCode":"\n/** The machine-readable publication date, hidden next to its localized form. */\nconst HIDDEN_ISO_DATE_RE = /display:\\s*none;?\\s*\"?>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</i;\n\n/** @param {any} ctx @param {number} ms */\nfunction sleep(ctx, ms) {\n  if (typeof ctx?.sleep === 'function') return ctx.sleep(ms);\n  return new Promise((r) => setTimeout(r, ms));\n}\n\n/** @param {string} url */\nfunction assertSenjobUrl(url) {\n  let parsed;\n  try {\n    parsed = new URL(url);\n  } catch {\n    throw new Error(`senjob: invalid URL: ${url}`);\n  }\n  if (parsed.protocol !== 'https:') throw new Error(`senjob: URL must use HTTPS: ${url}`);\n  if (parsed.hostname !== TRUSTED_HOST) {\n    throw new Error(`senjob: untrusted hostname \"${parsed.hostname}\" — must be ${TRUSTED_HOST}`);\n  }\n  return url;\n}\n\n/**\n * Collapse a markup fragment to its visible text.\n * Comments are stripped FIRST: the anchor bodies carry `<!-- d ico postulez -->`\n * between the title and a spacer image, and a naive tag strip would leave the\n * comment body sitting inside the title.\n * @param {string} fragment\n * @returns {string}\n */\nexport function visibleText(fragment) {\n  return decodeEntities(\n    String(fragment ?? '')\n      .replace(/<!--[\\s\\S]*?-->/g, ' ')","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/santifer/career-ops/blob/aac998c7ed7248ea853b720ceeb1fdbeb322fc5d/providers/senjob.mjs#L61-L97","documentation":"URL scheme guard in the Senjob provider (assertSenjobUrl): the parsed URL's protocol is not https:. The URL is well-formed and presumably passes the host checks, but the provider refuses non-HTTPS fetches. The input at fault is the board/scrape URL passed to the provider.","triggerScenarios":"Providing a senjob URL with protocol http: (or file:/ftp:) — commonly an http://www.senjob.de entry in config or a URL built without forcing the scheme.","commonSituations":"Legacy bookmarks/config predating the site's HTTPS migration, local http mocks, or hand-written entries using http://.","solutions":["Change the URL to https:// in the provider entry or config.","Fix URL-building code to always emit https.","For local HTTP test servers, mock at the fetch layer rather than passing an http:// URL."],"exampleFix":"// before\nurl = 'http://www.senjob.de/jobs';\n// after\nurl = 'https://www.senjob.de/jobs';","handlingStrategy":"validation","validationCode":"const isHttps = (u) => { try { return new URL(u).protocol === 'https:'; } catch { return false; } };\nif (!isHttps(entry.url)) entry.url = entry.url.replace(/^http:/, 'https:');","typeGuard":"const isHttpsUrl = (u) => { try { return new URL(u).protocol === 'https:'; } catch { return false; } };","tryCatchPattern":"try { await provider.fetch(entry, ctx); } catch (e) { if (e.message.includes('must use HTTPS')) { console.warn(`Upgrade ${entry.url} to https://`); return null; } throw e; }","preventionTips":["Audit config for http:// entries periodically.","Always emit https:// from URL-building helpers.","Upgrade legacy http bookmarks/config after site migrations."],"tags":["url-validation","https","security"],"backgroundTag":"invalid-url","analyzedSha":"aac998c7ed7248ea853b720ceeb1fdbeb322fc5d","analyzedAt":"2026-09-16T06:35:29.214Z","contentChangedAt":"2026-09-16T06:35:29.214Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}