donalmurtagh / grails-simple-captcha

Grails plugin that creates simple image CAPTCHAs that protect against automated completion and submission of HTML forms
Apache License 2.0
6 stars 11 forks source link

Simple Captcha not rendering in grails 2.5.5 #17

Closed jkramerDev closed 7 years ago

jkramerDev commented 7 years ago

Hey there,

Thanks for building this. I've just performed an upgrade from grails 1.x to 2.5.5 & in two different apps the simple captcha is not rendering where it worked previously. Notable is a 403 permission error on browser network debug. Thanks for your consideration.

ghost commented 7 years ago

It's no possible for me to investigate your issue without instructions to reproduce it or (ideally) a sample app that reproduces it. I'm closing this issue until you can provide one of these.

By the way, I'm using this plugin in a Grails 2.5.4 app, so it's not simply the case that it's incompatible with Grails 2.5.X

jkramerDev commented 7 years ago

Fair enough, Thanks for the quick response.

From: Dónal [mailto:notifications@github.com] Sent: Friday, November 04, 2016 11:52 AM To: domurtag/grails-simple-captcha grails-simple-captcha@noreply.github.com Cc: Kramer, Jeffrey I. jkramer@fairfield.edu; Author author@noreply.github.com Subject: Re: [domurtag/grails-simple-captcha] Simple Captcha not rendering in grails 2.5.5 (#17)

It's no possible for me to investigate your issue without instructions to reproduce it or (ideally) a sample app that reproduces it. I'm closing this issue until you can provide one of these.

By the way, I'm using this plugin in a Grails 2.5.4 app, so it's not simply the case that it's incompatible with Grails 2.5.X

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/domurtag/grails-simple-captcha/issues/17#issuecomment-258469720, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWL3CiFJoXnpWVRit5XrLUAeGrq26Ma1ks5q61SsgaJpZM4KppWx.

ghost commented 7 years ago

I might know what your problem is: if you've upgraded from the spring-security 1.X plugin to 2.X, the simple-captcha URLs will have been changed from publicly accessible to secured. To fix this, you'll need to add rules to Config.groovy to change them back to publicly accessible.

jkramerDev commented 7 years ago

Right as rain – adding this to config.groovy fixed it:

grails.plugin.springsecurity.controllerAnnotations.staticRules = [ '/simplecaptcha/captcha/**': ['IS_AUTHENTICATED_FULLY'] ]

Sorry, obviously it had nothing to do with the plugin after all.

cheers

From: Dónal [mailto:notifications@github.com] Sent: Friday, November 04, 2016 12:56 PM To: domurtag/grails-simple-captcha grails-simple-captcha@noreply.github.com Cc: Kramer, Jeffrey I. jkramer@fairfield.edu; Author author@noreply.github.com Subject: Re: [domurtag/grails-simple-captcha] Simple Captcha not rendering in grails 2.5.5 (#17)

I might know what your problem is: if you've upgraded from the spring-security 1.X plugin to 2.X, the simple-captcha URLs will have been changed from publicly accessible to secured. To fix this, you'll need to add rules to Config.groovy to change them back to publicly accessible.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/domurtag/grails-simple-captcha/issues/17#issuecomment-258487237, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AWL3CrfEILlxOQxn8cDi3zsXN31yo_fqks5q62OOgaJpZM4KppWx.