When you are not logged into the OPAC and attempt to email the contents of your cart you get the following error : "Wrong CSRF token at /usr/share/koha/opac/cgi-bin/opac/opac-sendbasket.pl line 55" Some testing shows: If you log in before adding items to your cart then send it, it works. If you're not logged in and you log in as part of sending the basket, the error occurs It must be that authenticating in that window doesn't set the session and id / secret aren't being set before submitting If you aren't logged in, click send the basket and log in, refresh the page before sending, then send, it forces it to pick up the session and works
I confirm this bug in 16.11.05.
It affects master as well
Created attachment 70084 [details] [review] Bug 18975: Retrieve up-to-date CGISESSID when just logged in If a user is asked to login before sending a card, the wrong (old) CGISESSID cookie is used. We need to retrieve the one that has just been created. This will certainly need more work, I guess other scripts are affected too.
Should this be NSO?
I do not have time to investigate more the other scripts, but this one patch can be tested yes.
Created attachment 71480 [details] [review] Bug 18975: Retrieve up-to-date CGISESSID when just logged in If a user is asked to login before sending a card, the wrong (old) CGISESSID cookie is used. We need to retrieve the one that has just been created. This will certainly need more work, I guess other scripts are affected too. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Created attachment 71883 [details] [review] Bug 18975: Retrieve up-to-date CGISESSID when just logged in If a user is asked to login before sending a card, the wrong (old) CGISESSID cookie is used. We need to retrieve the one that has just been created. This will certainly need more work, I guess other scripts are affected too. Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all! Pushed to stable for 17.11.03