openwebwork / webwork2

Course management front end for WeBWorK
http://webwork.maa.org/wiki/Main_Page
Other
141 stars 164 forks source link

Wait for render completion before saving tmp file when clicking "Check Answers" in the PG editor. #2396

Closed drgrice1 closed 2 months ago

drgrice1 commented 2 months ago

It seems that if the problem rendering request does not complete before the request to save the temporary file is sent, the streams can get crossed. We all know how bad that is!

This seems to only occur when proxying hypnotoad in some way or another. Somehow hypnotoad manages to keep the streams straight when proxying is not involved.

This is really not specific to the "Check Answers" button, but could occur with any of the submit buttons in the problem.

Also, don't add the passwd and key to the form when rendering via the render_rpc endpoint unless cookies are disabled for the request, and in the case that session_management_via is "session_cookie" don't add the key to the form.

This fixes issue #2394.

Alex-Jordan commented 2 months ago

I'll check this out soon and see. But about this:

This seems to only occur when proxying hypnotoad in some way or another.

My servers are using hypnotoad with no proxying.

drgrice1 commented 2 months ago

Your load balancer counts as a proxy. It is technically not a proxy, but I believe it is causing the same issue.