{"record":{"id":"0272e25ea85c4f5f","repo":"alibaba/nacos","slug":"invalid-probemodify","errorCode":null,"errorMessage":"invalid probeModify","messagePattern":"invalid probeModify","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"config/src/main/java/com/alibaba/nacos/config/server/paramcheck/ConfigListenerHttpParamExtractor.java","lineNumber":63,"sourceCode":"        ArrayList<ParamInfo> paramInfos = new ArrayList<>();\n        String listenConfigs = request.getParameter(\"Listening-Configs\");\n        if (StringUtils.isBlank(listenConfigs)) {\n            return paramInfos;\n        }\n        try {\n            listenConfigs = URLDecoder.decode(listenConfigs, Constants.ENCODE);\n        } catch (UnsupportedEncodingException e) {\n            throw new NacosRuntimeException(ErrorCode.UnKnowError.getCode(), e);\n        }\n        if (StringUtils.isBlank(listenConfigs)) {\n            return paramInfos;\n        }\n        String[] lines = listenConfigs.split(Character.toString(LINE_SEPARATOR_CHAR));\n        for (String line : lines) {\n            ParamInfo paramInfo = new ParamInfo();\n            String[] words = line.split(Character.toString(WORD_SEPARATOR_CHAR));\n            if (words.length < 2 || words.length > 4) {\n                throw new IllegalArgumentException(\"invalid probeModify\");\n            }\n            paramInfo.setDataId(words[0]);\n            paramInfo.setGroup(words[1]);\n            if (words.length == 4) {\n                paramInfo.setNamespaceId(words[3]);\n            }\n            paramInfos.add(paramInfo);\n        }\n        return paramInfos;\n    }\n}\n","sourceCodeStart":45,"sourceCodeEnd":75,"githubUrl":"https://github.com/alibaba/nacos/blob/9b989acdf181d00898f2e8839257bb2b2a3cefe3/config/src/main/java/com/alibaba/nacos/config/server/paramcheck/ConfigListenerHttpParamExtractor.java#L45-L75","documentation":"Thrown by ConfigListenerHttpParamExtractor.extractParam when a line in the Listening-Configs probe body (the v1 config-listen protocol) does not contain between 2 and 4 word-separated tokens. This is an IllegalArgumentException (uncaught runtime), indicating the probe-modify payload is malformed. Word separator is char(2), line separator is char(1).","triggerScenarios":"A client sends a config-listening long-polling request (v1 protocol) with a malformed Listening-Configs body where a line has fewer than 2 or more than 4 fields separated by the \\x02 character. The expected format per line is dataId\\x02group\\x02[contentMd5]\\x02[namespaceId].","commonSituations":"Custom or legacy client using wrong separators; corrupted probe payload; SDK bug generating the listening format; proxy/load-balancer mangling control characters.","solutions":["Ensure the client encodes the Listening-Configs body using \\x01 between config lines and \\x02 between fields (dataId, group, md5, namespaceId).","Upgrade the client SDK to a version that correctly builds the probe-modify payload.","Avoid proxies or middleware that strip non-printable control characters."],"exampleFix":"// before (malformed)\nString body = \"app.yml\"; // single token, no group\n// after\nchar w2 = (char) 2;\nString line = \"app.yml\" + w2 + \"DEFAULT_GROUP\" + w2 + md5 + w2 + namespaceId;","handlingStrategy":"validation","validationCode":"// Validate the listening-configs probe body before sending\nchar lineSep = (char) 1, wordSep = (char) 2;\nfor (String line : body.split(String.valueOf(lineSep))) {\n    String[] words = line.split(String.valueOf(wordSep));\n    if (words.length < 2 || words.length > 4) {\n        throw new IllegalArgumentException(\"invalid probeModify line: \" + line);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use the official Nacos client SDK which correctly builds the probe body.","Ensure each line has 2-4 fields: dataId, group, [md5], [namespaceId].","Avoid proxies that strip control characters (char 1 and 2)."],"tags":["config","listener","client-protocol","validation"],"backgroundTag":null,"analyzedSha":"9b989acdf181d00898f2e8839257bb2b2a3cefe3","analyzedAt":"2026-08-14T07:17:31.569Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}