Files
jenkins/core/src/main/java/hudson/security
16bf84c330 [JENKINS-71087] Nicer 404 error pages (#8250)
* Nicer 404 error pages

* Fix test, expose custom error message on 404 pages

* Record the current user to show an appropriate 404 page

* 404 simple page for the resource domain

the resource domain has no access to the static resources like
javascript and css. Open the images in the filter so we can at least
show an image.
Do not show the hint about not found or permission when accessing the
static-files url from the regular domain.

* Minor fixes and improvements

- Be more restrictive, only allow the specific image on simple 404
- Make extra resources work with non-empty resources path
- Do not redirect to 404 page after login from regular 404 page
- Remove 'Error:' prefix for friendlier page appearance
- Include favicon etc. resources in simple 404 page

* Fall back to 'Not Found' when accessing error pages directly

Also reformat

* Add 404 page tests

* Revert change to ResourceDomainTest

* Move test out of JenkinsTest, make parameterized for different contexts

* Return to the 404'd page after login by using 'from' session attribute

* Prevent 'REST API' link from showing on the error page

* Assert specific message on resource domain

* Remove obsolete commented out line

* Add Javadoc

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Markus Winter <m.winter@sap.com>
2023-08-23 07:27:21 +01:00
..