Archive > Technical discussions
Email confirmation functionality
EHM-0654 Murray:
A fruitful lunchtime of playing around and watching what happens leads me to believe that part of the problem may have been the way I was encoding/decoding the hash for "URL transportation". I've tweaked this particular section of the code and again, it's working repeatedly for me.
I think (fingers crossed) that it is now 100% A1 fixed and working for everyone, but I'll need some more tests to be sure.
EHM-0654 Murray:
Just a quick update. All the confirmation debugs I've received since my previous post have tested successfully in my special test page, so I am now pretty happy that I've gotten the bug(s) out of it now. I'll just need to back-port the changes into the new pilots code tonight and it'll all be good.
EDIT I've amended the code so that you'll only ever have a single record in the confirmation database, and despite my best efforts it seems as though every once in a while the confirmation code sends out a duff hash (one that will never work). Just reclick the "Confirm Email" button if it doesn't work for you first time.
EHM-0654 Murray:
Further update: I am certain I know what the problem is (was) now, and the change I've just made definitely appears to have fixed it. I ran three tests back-to-back and all three worked fine.
For the developers out there, beware of how you encode hashes in PHP (I'd hazard a guess that's any variety of hash. I'm using SSHA (SHA1+salt), but I suspect the same holds true for plain SHA1 and MD5). If the hash contains any of the usual URL suspects (definitely "/" and "\", and probably "+" as well), if it's not encoded correctly it'll break in transit. That, basically, is what was happening some of the time with the old code. The new code takes a "standard" SSHA hash and rawurlencode()s it before adding it to the email. As I say, that seems to work unlike all my previous attempts.
And if you've never heard of SSHA before, look for the comment from "alex at milivojevic dot org 28-Apr-2005 06:45" in the function definition for SHA1 on your local PHP website mirror.
EHM-0588 Paul:
After clicking on the Confirm Email button yesterday, not much happend in my mailbox and the pilot profile still show the message "You have an email confirmation attempt under way" today.
I am not sure if this is a bug. I haven't been here since summer 2004 so it could also be that the confirmation mail has been sent to an email adres that is no longer vallid. e.g. my old euroharmony adres from the time that i was in the management.
EHM-0654 Murray:
--- Quote ---Originally posted by Paul Soetens
After clicking on the Confirm Email button yesterday, not much happend in my mailbox and the pilot profile still show the message "You have an email confirmation attempt under way" today.
I am not sure if this is a bug. I haven't been here since summer 2004 so it could also be that the confirmation mail has been sent to an email adres that is no longer vallid. e.g. my old euroharmony adres from the time that i was in the management.
--- End quote ---
Paul, correct. From the email I get every time a confirmation attempt begins:-
--- Code: ---pID 89
pilotid 0588
email paul@euroharmony.com
timestamp 20060424154020
--- End code ---
I am going to put a "Change email address" (and a few other fields too...) function into the pilot homepage but if you email me (murray@fly-euroharmony.com) directly from your current email address, I'll go into the database and correct it manually, prior to the bigger changes going ahead.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version