{"record":{"id":"cdf7b1268932a3ac","repo":"chroma-core/chroma","slug":"invalid-authorization-header-format","errorCode":null,"errorMessage":"Invalid Authorization header format","messagePattern":"Invalid Authorization header format","errorType":"exception","errorClass":"AuthError","httpStatus":null,"severity":"error","filePath":"chromadb/auth/basic_authn/__init__.py","lineNumber":115,"sourceCode":"                    \"Usernames must be unique.\"\n                )\n            self._creds[username] = SecretStr(password)\n\n    @trace_method(\n        \"BasicAuthenticationServerProvider.authenticate\", OpenTelemetryGranularity.ALL\n    )\n    @override\n    def authenticate_or_raise(self, headers: Dict[str, str]) -> UserIdentity:\n        try:\n            if AUTHORIZATION_HEADER.lower() not in headers.keys():\n                raise AuthError(AUTHORIZATION_HEADER + \" header not found\")\n            _auth_header = headers[AUTHORIZATION_HEADER.lower()]\n            _auth_header = re.sub(r\"^Basic \", \"\", _auth_header)\n            _auth_header = _auth_header.strip()\n\n            base64_decoded = base64.b64decode(_auth_header).decode(\"utf-8\")\n            if \":\" not in base64_decoded:\n                raise AuthError(\"Invalid Authorization header format\")\n            username, password = base64_decoded.split(\":\", 1)\n            username = str(username)  # convert to string to prevent header injection\n            password = str(password)  # convert to string to prevent header injection\n            if username not in self._creds:\n                raise AuthError(\"Invalid username or password\")\n\n            _pwd_check = bcrypt.checkpw(\n                password.encode(\"utf-8\"),\n                self._creds[username].get_secret_value().encode(\"utf-8\"),\n            )\n            if not _pwd_check:\n                raise AuthError(\"Invalid username or password\")\n            return UserIdentity(user_id=username)\n        except AuthError as e:\n            logger.error(\n                f\"BasicAuthenticationServerProvider.authenticate failed: {repr(e)}\"\n            )\n        except Exception as e:","sourceCodeStart":97,"sourceCodeEnd":133,"githubUrl":"https://github.com/chroma-core/chroma/blob/aecdd12c8a891610db8653630b066b32ceb678b5/chromadb/auth/basic_authn/__init__.py#L97-L133","documentation":"Error \"Invalid Authorization header format\" thrown in chroma-core/chroma.","triggerScenarios":"Thrown at chromadb/auth/basic_authn/__init__.py:115 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"aecdd12c8a891610db8653630b066b32ceb678b5","analyzedAt":"2026-08-16T21:53:27.228Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}