Grails

Grails filter is not executed when requesting (/index.gsp)

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Won't Fix
  • Affects Version/s: 1.2.1
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows 7 (x64)

Description

In the attached project ("test_filter"), the filter below is defined in /test_filter/grails-app/conf/SecurityFilters.groovy

class SecurityFilters {
def filters = {
all(uri:"/**") {
before = { log.info("##In security filter") }
}
}
}

1) This does not execute on a call to: /test_filter/index.gsp
2) This does execute on a call to: /test_filter/

Disclaimer: I am new to Filters, but from the docs at: http://grails.org/doc/latest/guide/single.html#6.6 Filters I would expect this to work. Specifically, the example below lists the same filter:

allURIs(uri:'/**') {
}

Issue Links

Activity

Hide
Tim Reilly added a comment -

This may be related to: http://jira.codehaus.org/browse/GRAILS-5639

As always, many thanks to the dev team for an excellent product and diligent follow-up to bug reports like this one.

Show
Tim Reilly added a comment - This may be related to: http://jira.codehaus.org/browse/GRAILS-5639 As always, many thanks to the dev team for an excellent product and diligent follow-up to bug reports like this one.
Hide
Tsuyoshi Miyake added a comment -

I have exactly the same problem.
My env. is grails 1.2.2 (filters 1.2.2), ubuntu 9.10 64bit

Shiro (JSecurity) plugin has a default filter depending too much on this syntax (uri:"/**"), so I guess it's a bit important to fix this issue.

Show
Tsuyoshi Miyake added a comment - I have exactly the same problem. My env. is grails 1.2.2 (filters 1.2.2), ubuntu 9.10 64bit Shiro (JSecurity) plugin has a default filter depending too much on this syntax (uri:"/**"), so I guess it's a bit important to fix this issue.
Hide
Ryan Vanderwerf added a comment -

I have this problem in Grails 1.3.5 as well. It seems anything under /web-app/* cannot be filtered unless you create an old-school java filter. This is a giant pain, because to do that I can't have easy access to my services without building interfaces.

Show
Ryan Vanderwerf added a comment - I have this problem in Grails 1.3.5 as well. It seems anything under /web-app/* cannot be filtered unless you create an old-school java filter. This is a giant pain, because to do that I can't have easy access to my services without building interfaces.
Hide
Graeme Rocher added a comment -

map the view in UrlMappings.groovy if you want filters applied

Show
Graeme Rocher added a comment - map the view in UrlMappings.groovy if you want filters applied

People

Vote (1)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: