Skip to content

Fix 404s on form validation#93

Merged
mjeanson merged 2 commits into
jenkinsci:masterfrom
kienanstewart:fix-404s_on_form_validation
Mar 26, 2026
Merged

Fix 404s on form validation#93
mjeanson merged 2 commits into
jenkinsci:masterfrom
kienanstewart:fix-404s_on_form_validation

Conversation

@kienanstewart
Copy link
Copy Markdown
Contributor

@kienanstewart kienanstewart commented Mar 26, 2026

Update the checkUrl format used in configure-entries.jelly to the modern format.

With jenkins 2.541.3, the old format seems to havestopped working. When loading the form to add or edit a computer, the fields would show a jenkins 404 page after each attempt to validate the field values.

Testing done

With both jenkins 2.478 and 2.541:

  • Running the plugin with mvn hpi:run
  • Add a QEMU cloud
  • Add a libvirt-agent computer
  • Change the values of the startupTimesToRetryOnFailure and startupWaitingPeriodSeconds in the computer form to ensure that the values are validated

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests that demonstrate the feature works or the issue is fixed

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
This avoids 404 errors when attempting to validate the
startupTimesToRetryOnFailure and startupWaitingPeriodSeconds fields
when adding or editing a computer with Jenkins 2.541. This form is
available since Jenkins 2.360.

@see https://www.jenkins.io/doc/developer/security/csp/#legacy-javascript-checkurl-validation

Signed-off-by: Kienan Stewart <kstewart@efficios.com>
@mjeanson mjeanson merged commit e30f881 into jenkinsci:master Mar 26, 2026
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants