Integrate new CAPTCHA generation code into current webapp #7
Labels
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cerealxp/FreeCAPTCHA#7
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, app.py can generate old style captchas correctly, but does not work with the new ones. Ie, it doesn't randomize the images, or process the output, or anything like that.
What is remaining to integrate the new captcha generation technique?
All of the above issues should be linked to an issue here on gitlain.
Here is pseudocode for how it should basically work:
Some notes for the issue about generating the HTML and integrating with Jinja, since we don't have an issue for that (please, someone, do create one based on this note):
What we want (generate the recursive tree in Python)
Ideally, we could pass the recursive tree to Jinja, and Jinja could deal with the HTML.
Why? To separate separate presentation from program logic. If we want to play around with the HTML, we should be able to do that in the template. That's what it's for.
Is this possible with Jinja? Maybe, using recursive macros: https://stackoverflow.com/questions/32771924/macro-recursion-in-jinja2
This will be harder and require a lot more thought. But it would be the "best practice from a software engineering perspective. The usual compromise: Generate the HTML in Python and pass it to Jinja. Then one day when we have free time and want to mess around, figure out this recursive macro nonsense.
I will be editing these issues to flesh them out, the above is a rough draft still...
This is probably the most important issue because without this, there isn't even a working MVP
I'm going to try to make it work without setting up the JWT stuff or worrying about recursive Jinja complications. I'll just generate the html and serve it and use my current cookie concoction.