Edgewall Software
Modify

Ticket #7173 (closed enhancement: fixed)

Opened 4 years ago

Last modified 20 months ago

[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@…
Release Notes:
API Changes:

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

captchahandler.diff (4.7 KB) - added by stoecker 21 months ago.
development code to show possible way
captchapass.diff (4.8 KB) - added by stoecker 21 months ago.
Working version (tested with newticket) still including lots of debug code
captchapass_final.diff (4.2 KB) - added by stoecker 21 months ago.
Final version
captchapass_final_errorfix.diff (3.6 KB) - added by stoecker 21 months ago.
There was still a small glitch in error handling (value already deleted), which should be fixed in this version

Download all attachments as: .zip

Change History

comment:1 Changed 4 years ago by cboos

  • Milestone set to not applicable
  • Owner changed from mgood to cboos
  • Priority changed from normal to high
  • Status changed from new to assigned

Thanks for the reminder :-)

comment:2 Changed 2 years ago by anonymous

  • Resolution set to fixed
  • Status changed from assigned to closed
  • Version set to 0.11rc1
  • 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 2 years ago by rblank

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version 0.11rc1 deleted

Reverted random ticket butchering.

comment:4 Changed 2 years ago by cboos

  • Milestone changed from not applicable to spam-filter-plugin

comment:5 Changed 21 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 21 months ago by stoecker

development code to show possible way

Changed 21 months ago by stoecker

Working version (tested with newticket) still including lots of debug code

Changed 21 months ago by stoecker

Final version

comment:6 Changed 21 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 21 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 21 months ago by stoecker

There was still a small glitch in error handling (value already deleted), which should be fixed in this version

comment:8 Changed 20 months ago by dstoecker

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in r9875.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.