-
Bug
-
Resolution: Fixed
-
Minor
-
-
2.427, 2.426.1
Noting https://github.com/jenkinsci/jenkins/pull/6460#issuecomment-1466841649 from jglick
This breaks form validation—errors are not properly cleared and replaced with new errors. (Noticed in https://github.com/jenkinsci/ldap-plugin/pull/185#issuecomment-1460028705.) Reproducible in 2.355 but not 2.354 from /configureSecurity/ with a trivial plugin:
import hudson.Extension; import hudson.model.Descriptor; import hudson.security.SecurityRealm; import hudson.util.FormValidation; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; public final class XSecurityRealm extends SecurityRealm { public final String v; @DataBoundConstructor public XSecurityRealm(String v) { this.v = v; } @Override public SecurityComponents createSecurityComponents() { throw new UnsupportedOperationException(); } @Extension public static final class DescriptorImpl extends Descriptor<SecurityRealm> { @Override public String getDisplayName() { return "X"; } public FormValidation doCheckV(@QueryParameter String v) { return FormValidation.error(new IllegalStateException("Processing " + v), "Could not process " + v); } } }
<?xml version="1.0" encoding="UTF-8"?> <?jelly escape-by-default='true'?> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <f:entry field="v" title="Some value"> <f:textbox/> </f:entry> </j:jelly>
- is caused by
-
JENKINS-68373 Update form validation appearance
-
- Closed
-
- links to
[JENKINS-70793] Form validation does not clear previous errors (regression in 2.355)
Link |
New:
This issue is caused by |
Description |
Original:
Noting [https://github.com/jenkinsci/jenkins/pull/6460#issuecomment-1466841649] from [~jglick]
---- This breaks form validation—errors are not properly cleared and replaced with new errors. (Noticed in [https://github.com/jenkinsci/ldap-plugin/pull/185#issuecomment-1460028705].) Reproducible in 2.355 but not 2.354 from {{/configureSecurity/}} with a trivial plugin: {noformat} import hudson.Extension; import hudson.model.Descriptor; import hudson.security.SecurityRealm; import hudson.util.FormValidation; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; public final class XSecurityRealm extends SecurityRealm { public final String v; @DataBoundConstructor public XSecurityRealm(String v) { this.v = v; } @Override public SecurityComponents createSecurityComponents() { throw new UnsupportedOperationException(); } @Extension public static final class DescriptorImpl extends Descriptor<SecurityRealm> { @Override public String getDisplayName() { return "X"; } public FormValidation doCheckV(@QueryParameter String v) { return FormValidation.error(new IllegalStateException("Processing " + v), "Could not process " + v); } } } {noformat} {noformat} <?xml version="1.0" encoding="UTF-8"?> <?jelly escape-by-default='true'?> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <f:entry field="v" title="Some value"> <f:textbox/> </f:entry> </j:jelly> {noformat} |
New:
Noting [https://github.com/jenkinsci/jenkins/pull/6460#issuecomment-1466841649] from [~jglick]
---- This breaks form validation—errors are not properly cleared and replaced with new errors. (Noticed in [https://github.com/jenkinsci/ldap-plugin/pull/185#issuecomment-1460028705].) Reproducible in 2.355 but not 2.354 from {{/configureSecurity/}} with a trivial plugin: {code:java} import hudson.Extension; import hudson.model.Descriptor; import hudson.security.SecurityRealm; import hudson.util.FormValidation; import org.kohsuke.stapler.DataBoundConstructor; import org.kohsuke.stapler.QueryParameter; public final class XSecurityRealm extends SecurityRealm { public final String v; @DataBoundConstructor public XSecurityRealm(String v) { this.v = v; } @Override public SecurityComponents createSecurityComponents() { throw new UnsupportedOperationException(); } @Extension public static final class DescriptorImpl extends Descriptor<SecurityRealm> { @Override public String getDisplayName() { return "X"; } public FormValidation doCheckV(@QueryParameter String v) { return FormValidation.error(new IllegalStateException("Processing " + v), "Could not process " + v); } } } {code} {code:xml} <?xml version="1.0" encoding="UTF-8"?> <?jelly escape-by-default='true'?> <j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form"> <f:entry field="v" title="Some value"> <f:textbox/> </f:entry> </j:jelly> {code} |
Attachment | New: Sample plugin demonstrating impact.png [ 61050 ] |
Assignee | New: Daniel Beck [ danielbeck ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Remote Link | New: This issue links to "PR 8422 (Web Link)" [ 28899 ] |
Released As | New: 2.427 | |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Closed [ 6 ] |
Labels | Original: regression ux | New: lts-candidate regression ux |
Labels | Original: lts-candidate regression ux | New: 2.426.1-fixed regression ux |