{"record":{"id":"c53b0be9d757ab63","repo":"theonedev/onedev","slug":"password-and-its-confirmation-should-be-identical","errorCode":null,"errorMessage":"Password and its confirmation should be identical.","messagePattern":"Password and its confirmation should be identical\\.","errorType":"validation","errorClass":"ConversionException","httpStatus":null,"severity":"error","filePath":"server-core/src/main/java/io/onedev/server/web/editable/password/ConfirmativePasswordPropertyEditor.java","lineNumber":74,"sourceCode":"\t\t\t\n\t\t});\n\t\tinputAgain.add(new OnTypingDoneBehavior() {\n\n\t\t\t@Override\n\t\t\tprotected void onTypingDone(AjaxRequestTarget target) {\n\t\t\t\tonPropertyUpdating(target);\n\t\t\t}\n\t\t\t\n\t\t});\n\t}\n\n\t@Override\n\tprotected String convertInputToValue() throws ConversionException {\n\t\tif (input.getConvertedInput() != null) {\n\t\t\tif (inputAgain.getConvertedInput() == null)\n\t\t\t\tthrow new ConversionException(_T(\"Please confirm the password.\"));\n\t\t\telse if (!input.getConvertedInput().equals(inputAgain.getConvertedInput()))\n\t\t\t\tthrow new ConversionException(_T(\"Password and its confirmation should be identical.\"));\n\t\t\telse\n\t\t\t\treturn input.getConvertedInput();\n\t\t} else if (inputAgain.getConvertedInput() != null) {\n\t\t\tthrow new ConversionException(_T(\"Password and its confirmation should be identical.\"));\n\t\t} else {\n\t\t\treturn input.getConvertedInput();\n\t\t}\n\t}\n\n\t@Override\n\tpublic boolean needExplicitSubmit() {\n\t\treturn true;\n\t}\n\n}\n","sourceCodeStart":56,"sourceCodeEnd":90,"githubUrl":"https://github.com/theonedev/onedev/blob/d44925c47c37992c828ea673a5f9620539bc3ff2/server-core/src/main/java/io/onedev/server/web/editable/password/ConfirmativePasswordPropertyEditor.java#L56-L90","documentation":"ConfirmativePasswordPropertyEditor.convertInputToValue compares the two password fields; when they differ it raises a Wicket ConversionException (localized message) so the form re-renders with the error instead of saving a mistyped password.","triggerScenarios":"input != inputAgain after conversion, or input is null but inputAgain is non-null (only confirmation typed).","commonSituations":"Typos in one of the two password boxes; user fills only the confirm field; browser autofill filling one field only.","solutions":["Retype the password identically in both fields.","Clear autofilled fields and enter the password manually in both boxes.","If only changing/not changing a password, leave both fields empty."],"exampleFix":"// before\ninput=\"pw1\"; inputAgain=\"pw2\";\n// after\ninput=\"pw1\"; inputAgain=\"pw1\";","handlingStrategy":"validation","validationCode":"function canSubmit(pwd, confirm){ return (pwd||confirm) ? pwd === confirm : true; }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enter both fields together; avoid autofill for password editors.","Paste the same value into both fields.","Clear both fields if not changing the password."],"tags":["wicket","form-validation","password-mismatch"],"backgroundTag":"schema-validation-failed","analyzedSha":"d44925c47c37992c828ea673a5f9620539bc3ff2","analyzedAt":"2026-09-06T07:18:27.995Z","contentChangedAt":"2026-09-06T07:18:27.995Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}