IACR / latex-submit

Web server to receive uploaded LaTeX and execute it in a docker container.
GNU Affero General Public License v3.0
11 stars 0 forks source link

submit form should be stateful #17

Closed kmccurley closed 1 year ago

kmccurley commented 1 year ago

This is motivated by feedback from Joppe:

I uploaded a zip-file where the paper was in a folder. I got the error: 
“Missing main.tex. Your zip file should contain main.tex at the top level.”

It would be nice to show a button to resubmit at this point.

This is part of a much larger issue on how we maintain state on URLs for the submit form, which is accumulating a lot of URL parameters. When a user is directed to the submit form, the form can supply various things:

In flask we can provide these through URL parameters with url_for, and we can use the flash() method to add a message to the state for when something doesn't validate. One question is whether we should be using WTF forms as we did in forms.py for the authentication forms. This would automatically add CSRF protection, but the question is whether it's worth dedicating the entire site to this framework. Validation of the submit form is a bit complicated in routes.py::submitform().

kmccurley commented 1 year ago

I now consider this closed, since I switched to using flask-wtf for the submit form by adding SubmitForm to forms.py. The authentication had a few bugs that I think are now fixed.