{"record":{"id":"16282f487d326d8e","repo":"apache/flink","slug":"failed-to-sanitize-xml-document-destined-for-handl","errorCode":null,"errorMessage":"Failed to sanitize XML document destined for handler {}","messagePattern":"Failed to sanitize XML document destined for handler (.+?)","errorType":"exception","errorClass":"SdkClientException","httpStatus":null,"severity":"error","filePath":"flink-filesystems/flink-s3-fs-base/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java","lineNumber":232,"sourceCode":"                 */\n                String listingDoc = listingDocBuffer.toString().replaceAll(\"\\r\", \"&#013;\");\n\n                sanitizedInputStream = new ByteArrayInputStream(listingDoc.getBytes(UTF8));\n\n            } catch (IOException e) {\n                throw e;\n\n            } catch (Throwable t) {\n                try {\n                    inputStream.close();\n                } catch (IOException e) {\n                    if (log.isErrorEnabled()) {\n                        log.error(\n                                \"Unable to close response InputStream after failure sanitizing XML document\",\n                                e);\n                    }\n                }\n                throw new SdkClientException(\n                        \"Failed to sanitize XML document destined for handler \"\n                                + handler.getClass(),\n                        t);\n            }\n            return sanitizedInputStream;\n        }\n    }\n\n    /**\n     * Disables certain dangerous features that attempt to automatically fetch DTDs\n     *\n     * <p>See <a\n     * href=\"https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Prevention_Cheat_Sheet#XMLReader\">OWASP\n     * XXE Cheat Sheet</a>\n     *\n     * @param reader the reader to disable the features on\n     * @throws SAXNotRecognizedException\n     * @throws SAXNotSupportedException","sourceCodeStart":214,"sourceCodeEnd":250,"githubUrl":"https://github.com/apache/flink/blob/2f3c205e9266cb30240eb7f4fdab15cad629a70f/flink-filesystems/flink-s3-fs-base/src/main/java/com/amazonaws/services/s3/model/transform/XmlResponsesSaxParser.java#L214-L250","documentation":"Error \"Failed to sanitize XML document destined for handler {}\" thrown in apache/flink.","triggerScenarios":"Triggered at runtime when the operation fails because: Failed to sanitize XML document destined for handler the reported value.","commonSituations":"Commonly caused by misconfiguration, missing dependencies or files, unsupported types or operations, or invalid user input leading to: Failed to sanitize XML document destined for handler the reported value.","solutions":["Address the cause reported by the error message: Failed to sanitize XML document destined for handler the reported value","Verify the inputs, configuration values, and classpath/dependency setup related to this operation, then retry."],"exampleFix":"Correct the condition described (\"Failed to sanitize XML document destined for handler the reported value\") and rerun the job or command.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"2f3c205e9266cb30240eb7f4fdab15cad629a70f","analyzedAt":"2026-08-14T08:48:24.518Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}