vForums Support :: vForums :: Report a Bug :: API and Verification Email Bugs - View Topic
 |  |
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | API and Verification Email Bugs (28th Jan 10 at 3:09am EST) Resolved | Quote | Ross,
Problem One:
I was tweaking with the registration system some more and created an account and for some reason the validation email is being received like this
http://i25.photobucket.com/albums/c51/dog199200/errorvalid.jpg
The username, password, none of that can even be seen.
Problem Two:
After a few guess and hit clicks to be able to click the validation link, it gave me this:
http://www.divineshadowsonline.com/action/validate/key/9f0ba05d0918fec982589156cd469451
The problem is that it doesn't work to well since the url to use it is http://www.forum.divineshadowsonline.com/action/validate/key/9f0ba05d0918fec982589156cd469451 so its seeing my domain, but ignoring my subdomain which don't work.
Question:
I know there is a check in the API to see if the forum is sending the email, but how can you get it so that the forum doesn't send the email at all, where I can send my own custom email, from one of my own email addresses, and yet still be able to send the validation keys and stuff? | |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,270 Status: Offline Age: 22 Joined:
Additional Groups: Support Team
  
pmwwwmsngtalk vForum | | Re: API and Verification Email Bugs (28th Jan 10 at 6:29am EST) | Quote | Problem 1: It's having trouble loading the skin information. I'll have to check what you've got setup and what it is trying to load. I'll probably also put in a fail-safe so if it cannot find a skin to load it uses some basic one with a font size defined.
Problem 2: I will have to check which domain it attempts to use. It may need two domains defining (one for cookies and one for e-mail links). I'll do some tests and get back to you. | |
|
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | | Re: API and Verification Email Bugs (28th Jan 10 at 6:32am EST) | Quote | OK oh and speaking of domains, i'd also like to note that the API doesn't exactly work to well with cross domain related things, and that includes sub-domains. I can logout of the forum at the same time as the website, but if there is places using another sub-domain like http://www.store.divineshadowsonline.com, it wont log out of it, even if all the system are exactly the same | |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,270 Status: Offline Age: 22 Joined:
Additional Groups: Support Team
  
pmwwwmsngtalk vForum | | Re: API and Verification Email Bugs (28th Jan 10 at 6:12pm EST) | Quote | You would need to make sure that all cookies are stored on the .divineshadowsonline.com domain. I've not looked at #2 yet so am not sure what domain your forum is using for cookies yet.
#1 should now be fixed.
| |
|
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | | Re: API and Verification Email Bugs (28th Jan 10 at 6:50pm EST) | Quote | Ok i'll test out the first bug and see if its fixed.
after for two, if its calling off of the forum for the cookie that cause the problem XD | |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | | Re: API and Verification Email Bugs (1st Feb 10 at 9:34pm EST) | Quote | | any luck in finding out what domain all the cookies and stuff are being saved too as well as the second problem I pointed out? | |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,270 Status: Offline Age: 22 Joined:
Additional Groups: Support Team
  
pmwwwmsngtalk vForum | | Re: API and Verification Email Bugs (5th Feb 10 at 7:07pm EST) | Quote | | I'm just trialling a fix for the cookie issues. I've run out of time now but will try to get it applied to your forum sometime tomorrow (it also requires a slight change to the API) | |
|
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | | Re: API and Verification Email Bugs (5th Feb 10 at 8:34pm EST) | Quote | | ok np, i'll just need an idea of how much it effect my coding, most everything i have done it login checks | |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,270 Status: Offline Age: 22 Joined:
Additional Groups: Support Team
  
pmwwwmsngtalk vForum | | Re: API and Verification Email Bugs (6th Feb 10 at 6:25am EST) | Quote | ok np, i'll just need an idea of how much it effect my coding, most everything i have done it login checks
It's just a case of changing 3 lines in the vforums_api.php file | |
|
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | | Re: API and Verification Email Bugs (6th Feb 10 at 7:08am EST) | Quote | | ah ok, so nothing drastic XD | |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,270 Status: Offline Age: 22 Joined:
Additional Groups: Support Team
  
pmwwwmsngtalk vForum | | Re: API and Verification Email Bugs (6th Feb 10 at 4:34pm EST) | Quote | OK, I have the necessary changes to the forum. Now for the API. In the vforums_api.php change these lines:
header("Set-Cookie: pass=$pass; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false); header("Set-Cookie: user=$user; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false); if($this -> domain && !empty($this -> domain)) { header("Set-Cookie: pass=$pass; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false); header("Set-Cookie: user=$user; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false); }
With this:
if($this -> domain && !empty($this -> domain)) { header("Set-Cookie: pass=$pass; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false); header("Set-Cookie: user=$user; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false); } else { header("Set-Cookie: pass=$pass; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false); header("Set-Cookie: user=$user; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false); }
Then, whenever you initiate the API you need to ensure you set the third parameter as your domain (without the www)
$vf = new vforums_api('username.vforums.co.uk', 'SecretKey', 'divineshadowsonline.com');
I'd recommend manually clearing the cookies / using a fresh browser to test it incase you have old cookies stored still. | |
|
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | | Re: API and Verification Email Bugs (6th Feb 10 at 8:10pm EST) | Quote | What one do I change, ro do I chanve both cases that this shows up?
 Code: - header("Set-Cookie: pass=$pass; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
- header("Set-Cookie: user=$user; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
- if($this -> domain && !empty($this -> domain)) {
- header("Set-Cookie: pass=$pass; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/; HTTPonly;", false);
- header("Set-Cookie: user=$user; domain=". preg_replace("/^https?:\/\//", "", $this -> domain) ."; expires=". date("D, d-M-Y H:i:s T", $login_time) ."; path=/;", false);
- }
Its shows up under both Logout and login_user functions | |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Ross Administrator
    
![[Avatar]](http://uploads.virtualforums.co.uk/forums/pokemon/vforums-qr1.png) Posts: 3,270 Status: Offline Age: 22 Joined:
Additional Groups: Support Team
  
pmwwwmsngtalk vForum | | Re: API and Verification Email Bugs (6th Feb 10 at 8:12pm EST) | Quote | Just for login. Logout is slightly different | |
|
| Broken Senior Member
   
![[Avatar]](http://i25.photobucket.com/albums/c51/dog199200/Dont%20removm/brokenavi.png) Lost Resolve Posts: 1,642 Status: Offline Gender: Male Age: 18 Joined:
pmmsnyahooaim | | Re: API and Verification Email Bugs (6th Feb 10 at 8:14pm EST) | Quote | yea i just noticed that when looking at then through a syntax highlighter
Edit: Ok it seems to be working ok, at least its not breaking the code. I just changed hosts and they have yet to configure my DNS settings for me, so I can't test the sub-domains, but i will as soon as I can. As well seems as if the email is working right again so thank you very much
| |
If you fall I’ll catch, if you love I’ll love, And so it goes, my dear, don’t be scared, you’ll be safe, This I swear. If you only love me back.
 |
| Darkmage™ Very Senior Member
     I.. will never be a memory..
![[Avatar]](http://i185.photobucket.com/albums/x20/magedesigns/avatar/tux_thumb.png) Mess with the best... Die like the rest! Posts: 2,541 Status: Offline Gender: Male Location: vForums Age: 19 Joined:
pmwwwxfire vForum | | Re: API and Verification Email Bugs (7th Feb 10 at 3:12pm EST) | Quote | | I can confirm that it's working properly, because I registered and got the email, and it looked normal. | |
 Have a PS3? Play Modern Warfare2? Add me Darkmage4. |
| |
 |  |
|