django-simple-captcha icon indicating copy to clipboard operation
django-simple-captcha copied to clipboard

CAPTCHA_LETTER_COLOR_FUNCT

Open mheidarian opened this issue 4 years ago • 1 comments

Create a feature that can be used to change the color of captcha letters. For example, random colors

mheidarian avatar Aug 09 '21 05:08 mheidarian

Thank you, this is actually a really good idea! Not sure it'd make CAPTCHAs harder to defeat for an attacker, but a colorful challenge could be more fun to interact with.

Two tiny requests, if you would be so kind:

  1. I'd like get_letter_color() to accept two arguments: an integer index of the position in the for char in charlist: loop, and the second one being charlist itself. These two arguments should then be passed to the configured callable. This would make it easier to apply particular colors to a given letter, say, or apply a color spectrum over the length of the CAPTCHA. Please also include these arguments in the description of the function in the documentation.
  2. A test would be most welcome :grin:

Thanks!

mbi avatar Aug 09 '21 18:08 mbi