Ticket #7173 (closed enhancement: fixed)
[PATCH] spam-filter-captcha should not require reentering a ticket after resolving an equation
| Reported by: | anonymous | Owned by: | cboos |
|---|---|---|---|
| Priority: | high | Milestone: | plugin - spam-filter |
| Component: | plugin/spamfilter | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | shendric@… |
Description
I am now able to use the non-image spam-filter-captcha handler. However, after resolving the equation, I have to start over with a new ticket. Assuming that the person spent a long time submitting the ticket, it would probably be preferable to submit the ticket that they were trying to fill out the first time.
This is a follow up to #7148
Attachments
Change History
comment:1 Changed 2 years ago by cboos
- Owner changed from mgood to cboos
- Priority changed from normal to high
- Status changed from new to assigned
- Milestone set to not applicable
comment:2 Changed 11 months ago by anonymous
- Status changed from assigned to closed
- Version set to 0.11rc1
- Resolution set to fixed
- owner changed from mgood to cboos
- priority changed from normal to high
- status changed from new to assigned
- milestone set to not applicable
comment:3 Changed 11 months ago by rblank
- Status changed from closed to reopened
- Version 0.11rc1 deleted
- Resolution fixed deleted
Reverted random ticket butchering.
comment:5 Changed 4 months ago by stoecker
I was able to change the code, so the data is passed through to the captch verification code, but I found no way to tell Trac that it should revalidate the request. I'm stuck in IRequesthandler or IRequestFilter, as I can change the request, but am unable to tell trac about it and the check what handler is responsible is done before I get the chance to change it.
IRequestFilter gets a handler parameter and also returns it, so it is probably possible to replace the handler - How I'm able to find the correct new one?
I attach my current test code which is partly commented out and contains lots of debug statements.
Changed 4 months ago by stoecker
- attachment captchahandler.diff added
development code to show possible way
Changed 4 months ago by stoecker
- attachment captchapass.diff added
Working version (tested with newticket) still including lots of debug code
comment:6 Changed 4 months ago by anonymous
- Summary changed from spam-filter-captcha should not require reentering a ticket after resolving an equation to [PATCH] spam-filter-captcha should not require reentering a ticket after resolving an equation
Attached a final version cleaning up a lot and removing debug stuff. This one works fine for new wiki pages and new and existing tickets. Maybe additional variables must be saved for other places, but the general structure should be correct and working fine.
comment:7 Changed 4 months ago by cboos
Thanks for the patch, I'll try it soon.
Btw, have you tried to see if this works in all common situations,after creating a new wiki page or ticket, after editing a page or submitting a ticket change?
Changed 4 months ago by stoecker
- attachment captchapass_final_errorfix.diff added
There was still a small glitch in error handling (value already deleted), which should be fixed in this version



Thanks for the reminder :-)