vikingforties / CANP

Web App to submit Civil Aircraft Notification Procedure emails to the RAF. Intended for the UK free flight community to use.
0 stars 0 forks source link

Failure associated with Recaptcha #1

Open cefn opened 2 years ago

cefn commented 2 years ago

Hi all,

I encountered an error when submitting CANP which I think probably prevents it from sending email when the recaptcha->score reference is not available for some reason. I encounter this on a Google Pixel 5. There is an error case related to this which serves a nice message reCAPTCHA score low. Contact the site owners if you're not a bot. but the code never reaches that point.

Could the mobile layout be hiding some recaptcha control that needed filling in? I saw this some time ago when filling out the form in non-ideal conditions (daylight on screen) and assumed I'd done something wrong but this time I'm pretty certain the data was fine.

It's possible there was a delay between filling the form and successfully submitting the data because I was in a tricky internet area. I had to refresh after reconnecting (sending form data) before the page returned.

I hope this issue isn't causing all outbound CANP to fail.

https://github.com/vikingforties/CANP/blob/master/send_canp_email.php#L114

image image

vikingforties commented 2 years ago

Hi Cefn,

Just checked, site appears to be working okay. The recaptcha is also used on the test page (https://canp.logans.me.uk/index_test.html) so once you have have better connectivity you can test again.

As far as I'm aware the if the recaptcha pic loads, it's code should have all loaded too. There is a back and forth that the Google JS loaded for recaptcha performs in order to get the trust value from the form post. A refreshed page in the middle of a dropped connection sound like an ideal way to either drop the packet with the score or force some different session identifier for the data coming from a resent form post.

Looks like I'm not handling the error with a message that makes any sense to the usual user. So I'll look at make that smoother.

Thanks for the info. Pete