{"record":{"id":"103bee1e947c710c","repo":"zaproxy/zaproxy","slug":"context-struct-warning-stdparser-dup","errorCode":null,"errorMessage":"context.struct.warning.stdparser.dup","messagePattern":"context\\.struct\\.warning\\.stdparser\\.dup","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"warning","filePath":"zap/src/main/java/org/zaproxy/zap/view/ContextStructurePanel.java","lineNumber":215,"sourceCode":"            this.getPostKvPairSeparators().setText(formStdParamParser.getKeyValuePairSeparators());\n            this.getPostKeyValueSeparators().setText(formStdParamParser.getKeyValueSeparators());\n        }\n    }\n\n    @Override\n    public void validateContextData(Session session) throws Exception {\n        if (this.urlKvPairSeparators.getText().length() == 0) {\n            throw new IllegalArgumentException(\n                    Constant.messages.getString(\"context.struct.warning.stdparser.nokvpsep\"));\n        }\n        if (this.urlKeyValueSeparators.getText().length() == 0) {\n            throw new IllegalArgumentException(\n                    Constant.messages.getString(\"context.struct.warning.stdparser.nokvsep\"));\n        }\n        // Don't allow any common characters\n        for (char ch : this.urlKvPairSeparators.getText().toCharArray()) {\n            if (this.urlKeyValueSeparators.getText().contains(\"\" + ch)) {\n                throw new IllegalArgumentException(\n                        Constant.messages.getString(\"context.struct.warning.stdparser.dup\"));\n            }\n        }\n\n        if (this.postKvPairSeparators.getText().length() == 0) {\n            throw new IllegalArgumentException(\n                    Constant.messages.getString(\"context.struct.warning.stdparser.nokvpsep\"));\n        }\n        if (this.postKeyValueSeparators.getText().length() == 0) {\n            throw new IllegalArgumentException(\n                    Constant.messages.getString(\"context.struct.warning.stdparser.nokvsep\"));\n        }\n        // Don't allow any common characters\n        for (char ch : this.postKvPairSeparators.getText().toCharArray()) {\n            if (this.postKeyValueSeparators.getText().contains(\"\" + ch)) {\n                throw new IllegalArgumentException(\n                        Constant.messages.getString(\"context.struct.warning.stdparser.dup\"));\n            }","sourceCodeStart":197,"sourceCodeEnd":233,"githubUrl":"https://github.com/zaproxy/zaproxy/blob/9d1970a436b1b189bfb588fc88864c80d9baf6a5/zap/src/main/java/org/zaproxy/zap/view/ContextStructurePanel.java#L197-L233","documentation":"Thrown by ContextStructurePanel.validateContextData when a character appears in both the URL Key/Value Pair Separators and Key/Value Separators fields. Overlapping separators make tokenization ambiguous, so ZAP rejects the combination with this message.","triggerScenarios":"Saving the structure panel where any character in urlKvPairSeparators also occurs in urlKeyValueSeparators (e.g. both fields containing '=').","commonSituations":"Users type '=' into both separator fields, or use the same character (like ';') for pair and key/value splitting.","solutions":["Remove the shared character from one of the two separator fields so they are disjoint.","Use the standard combination: '&' for pair separators and '=' for key/value separators.","Add a client-side check that the two field contents share no characters before confirming."],"exampleFix":"// before\nurlKvPairSeparators.setText(\"=&\"); urlKeyValueSeparators.setText(\"=\");\n\n// after\nurlKvPairSeparators.setText(\"&\"); urlKeyValueSeparators.setText(\"=\");","handlingStrategy":"validation","validationCode":"String pairs = urlKvPairSeparators.getText(), kvs = urlKeyValueSeparators.getText();\nfor (char c : pairs.toCharArray()) { if (kvs.indexOf(c) >= 0) { throw new IllegalStateException(\"Separator overlap: \" + c); } }","typeGuard":null,"tryCatchPattern":"try { panel.validateContextData(session); } catch (IllegalArgumentException e) { showError(e.getMessage()); }","preventionTips":["Use standard disjoint separators: '&' for pairs, '=' for key/value","Check the two fields share no characters before saving","Avoid characters that serve both splitting roles"],"tags":["swing","ui-validation","url-parser","configuration"],"backgroundTag":"conflicting-config-values","analyzedSha":"9d1970a436b1b189bfb588fc88864c80d9baf6a5","analyzedAt":"2026-09-05T19:26:59.356Z","contentChangedAt":"2026-09-05T19:26:59.356Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}