Ignore:
Timestamp:
23 Sep 2025, 16:45:23 (14 months ago)
Author:
Henrik Bettermann
Message:

Use random solution and hide testing captcha field.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py

    r18173 r18183  
    120120##
    121121class StaticCaptcha(object):
    122     """The StaticCaptcha always has the same solution: 'the-solution'.
     122    """The StaticCaptcha always has a random solution.
    123123
    124124    It is of no use for real world but for tests. In tests we cannot
    … …  
    153153        """Display challenge and input field for solution as HTML.
    154154        """
     155        solution = random().randint(1000000000, 9999999999)
    155156        html = _(
    156157            u'<input type="hidden" name="challenge"'
    157             u' value="the-solution" /><br />'
    158             u'Type: %s<br />'
    159             u'<input type="text" name="solution" value="the-solution"'
    160             u' /><br />')
     158            u' value="%s" />'
     159            u'<input type="hidden" name="solution" value="%s"'
     160            u' />' % (solution, solution))
    161161        return html
    162162
Note: See TracChangeset for help on using the changeset viewer.