{"record":{"id":"8e8e65fc333f13d9","repo":"deepseek-ai/deepseek-harness","slug":"web-blocked-url","errorCode":"WEB_BLOCKED_URL","errorMessage":"credentials in URLs are not allowed","messagePattern":"credentials in URLs are not allowed","errorType":"error_code","errorClass":"WebError","httpStatus":null,"severity":"error","filePath":"packages/web/web-fetch-http/src/policy.ts","lineNumber":38,"sourceCode":" * @param input - the raw URL string from the fetch request.\n * @param maxUrlLength - inclusive upper bound on `input`'s length.\n * @returns the parsed `URL`.\n */\nexport function validateFetchUrl(input: string, maxUrlLength: number): URL {\n  if (input.length > maxUrlLength) {\n    throw new WebError(`URL exceeds the maximum length of ${maxUrlLength}`, 'WEB_INVALID_URL')\n  }\n  let url: URL\n  try {\n    url = new URL(input)\n  } catch (error: unknown) {\n    throw new WebError(`invalid URL: ${input}`, 'WEB_INVALID_URL', { cause: error })\n  }\n  if (url.protocol !== 'http:' && url.protocol !== 'https:') {\n    throw new WebError(`unsupported URL scheme \"${url.protocol}\" (only http and https are allowed)`, 'WEB_INVALID_URL')\n  }\n  if (url.username.length > 0 || url.password.length > 0) {\n    throw new WebError('credentials in URLs are not allowed', 'WEB_BLOCKED_URL')\n  }\n  return url\n}\n\n/**\n * Two URLs are same-origin when scheme, hostname, and port match. A redirect\n * that crosses origins is refused so each new origin requires a fresh tool call\n * (and thus a fresh provider/permission decision).\n *\n * @param a - one of the two URLs to compare.\n * @param b - the other URL to compare.\n * @returns true when `a` and `b` share scheme, hostname, and port.\n */\nexport function isSameOrigin(a: URL, b: URL): boolean {\n  return a.protocol === b.protocol && a.hostname === b.hostname && a.port === b.port\n}\n\n/**","sourceCodeStart":20,"sourceCodeEnd":56,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/web/web-fetch-http/src/policy.ts#L20-L56","documentation":"Error \"credentials in URLs are not allowed\" thrown in deepseek-ai/deepseek-harness.","triggerScenarios":"Thrown at packages/web/web-fetch-http/src/policy.ts:38 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove userinfo credentials from the URL; pass credentials through headers if allowed."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","schemaVersion":2},"datasetVersion":"2026-08-24T22:17:12.610Z"}