- This topic is empty.
-
AuthorPosts
-
January 16, 2013 at 1:38 am #121142
__
ParticipantEverywhere I see it in that article, `isset()` (and/or `empty()`) is being used during the oauth process – e.g., to check what the response returned. The Opauth example does this as well (are you still using the opauth class?).
Yes, those checks should remain.
However, don’t use them when(if) you’re accessing the results via the `twitter_user` class:
#no
if( isset( $twitter_user->name ) ){
print $twitter_user->name;
}#yes
print $twitter_user->name;*****
**edit***Also, the code in that article uses the mysql_…() functions.*
*ext/mysql is long outdated and will be deprecated in PHP 5.5. It **should not be used** in new work (try [ext/mysql**i**](http://php.net/mysqli) or [PDO](http://php.net/pdo) instead).*
January 16, 2013 at 1:43 am #121143chrisburton
Participant@traq I mean, as long as it’s secure, I’m not worried about it. I just want to make sure the users info is not vulnerable. It looks like I have a lot to learn. By the way, when you get Kirby up and running, I’d love to see you create a plugin that does this.
Regarding Opauth class, I’m not sure. What I sent you is what I am still using. I just pasted your code below the code that Opauth comes with.
January 16, 2013 at 10:30 am #121164__
ParticipantKeeping the checks will prevent errors. It may not lead directly to security vulnerabilities, but it definitely makes for better UX and also best coding practice.
> It looks like I have a lot to learn.
Everyone does. That’s the fun part.
> By the way, when you get Kirby up and running, I’d love to see you create a plugin that does this.
Maybe. I’ll have to see how easy it is to integrate.
> I just pasted your code below the code that Opauth comes with.
which is exactly what I did; works great (that example is on one of my old domains that is still running PHP 5.2). Taking the code you gave me, those minor changes to my class are all it took.
January 16, 2013 at 1:28 pm #121177TheDoc
Member@traq – super forum props for helping Chris out with this. I’ve been following this thread and have admired your dedication to the problem!
January 16, 2013 at 3:43 pm #121187__
Participant@TheDoc – thanks very much. I’ve enjoyed it …and my own projects may benefit from this as well :)
January 16, 2013 at 5:29 pm #121198chrisburton
ParticipantJanuary 16, 2013 at 8:47 pm #121219__
ParticipantYou’re quite welcome, thank you.
Just to clarify, is this working for you now?
January 16, 2013 at 8:53 pm #121220chrisburton
Participant@traq Working 100%. Much easier to write also so that’s a definite plus. Thanks again, I owe you one.
January 16, 2013 at 11:53 pm #121232__
Participantno prob. cool.
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.