{"record":{"id":"727013be45b70048","repo":"apache/hadoop","slug":"received-corrupt-response","errorCode":null,"errorMessage":"Received corrupt response","messagePattern":"Received corrupt response","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslPlainServer.java","lineNumber":88,"sourceCode":"  @Override\n  public String getMechanismName() {\n    return \"PLAIN\";\n  }\n  \n  @Override\n  public byte[] evaluateResponse(byte[] response) throws SaslException {\n    if (completed) {\n      throw new IllegalStateException(\"PLAIN authentication has completed\");\n    }\n    if (response == null) {\n      throw new IllegalArgumentException(\"Received null response\");\n    }\n    try {\n      String payload;\n      try {\n        payload = new String(response, StandardCharsets.UTF_8);\n      } catch (Exception e) {\n        throw new IllegalArgumentException(\"Received corrupt response\", e);\n      }\n      // [ authz, authn, password ]\n      String[] parts = payload.split(\"\\u0000\", 3);\n      if (parts.length != 3) {\n        throw new IllegalArgumentException(\"Received corrupt response\");\n      }\n      if (parts[0].isEmpty()) { // authz = authn\n        parts[0] = parts[1];\n      }\n      \n      NameCallback nc = new NameCallback(\"SASL PLAIN\");\n      nc.setName(parts[1]);\n      PasswordCallback pc = new PasswordCallback(\"SASL PLAIN\", false);\n      pc.setPassword(parts[2].toCharArray());\n      AuthorizeCallback ac = new AuthorizeCallback(parts[1], parts[0]);\n      cbh.handle(new Callback[]{nc, pc, ac});      \n      if (ac.isAuthorized()) {\n        authz = ac.getAuthorizedID();","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/apache/hadoop/blob/2add9630210752f88ceb1bb74eb65e37bf41da8e/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslPlainServer.java#L70-L106","documentation":"Error \"Received corrupt response\" thrown in apache/hadoop.","triggerScenarios":"Thrown at hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/SaslPlainServer.java:88 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the SASL PLAIN exchange for truncation or encoding errors; the client response could not be parsed.","Verify client and server use compatible Hadoop versions and the same SASL mechanism.","Inspect the network path (proxies, load balancers) that might alter RPC payloads."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2add9630210752f88ceb1bb74eb65e37bf41da8e","analyzedAt":"2026-08-22T19:55:07.957Z","schemaVersion":2},"datasetVersion":"2026-08-23T01:17:44.959Z"}