简体   繁体   中英

Securing user profile retrieve from Facebook login

Hi I am currently adding social login to my web app, an option to register to my app using Facebook profile.

Would it be ideal to sanitize and filter validate those information that my app will receive from Facebook call back? Or does Facebook already clean their info before sending it?

If you think I need to clean it myself, would sanitize string enough for names, updated_time (a date time Object)? How about the id? does all social network use numbers for user id?

If you're using official plugins directly from FB or any other major company, you don't need to sanitize it.

But if you're using any 3rd party plugin, use this: http://php.net/manual/en/filter.filters.sanitize.php

and choose each filter carefully to match your item.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM