Skip to content

setting adh.errorPage to null causes Tomcat to fail on startup #635

Closed
@jknudsen

Description

@jknudsen

Setting the adh.errorPage to null causes an Application run failed message with an Exception provided below. Per the documentation null is valid and is what I have used with past versions of this plugin prior to the version 4 for Grails 4.

Steps to Reproduce

  1. Create Application and add the Spring Secuirty Plugin to build.gradle
  2. Set the adh.errorPage to null in application.yml

grails:
plugin:
springsecurity:
adh:
errorPage: null

Expected Behavior

Documentation says it should send a 403:

Location of the 403 error page (or set to null to send a 403 error and not render a page)

Actual Behaviour

Caused by: org.springframework.beans.PropertyBatchUpdateException: Failed properties: Property 'errorPage' threw exception; nested exception is java.lang.AssertionError: ErrorPage must begin with '/'. Expression: ((page == null) || page.startsWith(/)). Values: page =
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:135)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:79)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1705)
... 77 common frames omitted

Environment Information

  • Operating System: Windows 10
  • GORM Version: 7.0.8.RELEASE
  • Grails Version (if using Grails): 4.0.10
  • JDK Version: 8u152 tried 11 also
  • SpringSecurityPlug: org.grails.plugins:spring-security-core:4.0.3

Example Application

https://github.com/jknudsen/testspp

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions