Tag Archives: PHP

WP-OAuth Is Not Vulnerable to SpoofedMe Social Login Exploit

The SpoofedMe social login exploit is a known weakness of the OAuth2 “spec”. The OAuth2 spec doesn’t define strict implementation standards, so developers have free reign to come up with some pretty wild implementations, or hack together a few libraries until it works. And that’s where the problem lies. There is no standard. Furthermore, social login is something that is normally built on top of OAuth2, and there’s no standard for that either. Some folks are trying to standardize social login with OpenID Connect (I like to think of this as “OAuth2-Strict”), but until then we will be facing issues like SpoofedMe because developers are not gods.

The SpoofedMe exploit is actually similar to this one, from a Google security advisory earlier this year:

“An attacker could forge an OpenID request that doesn’t ask for the user’s email address, and then insert an unsigned email address into the IDPs response. If the attacker relays this response to a website that doesn’t notice that this attribute is unsigned, the website may be tricked into logging the attacker in to any local account.” –Link

Thankfully, I read the spec and decided not to implement this gaping security hole in WP-OAuth to begin with. Properly identifying users to perform the account match was one of the biggest design challenges that I encountered because not only were there numerous docs and specs to work through, there were a lot of existing implementations that did it wrong. I had to start from scratch.

8 Social Login Plugins for WordPress Compared

wordpress-logo-simplified-rgbI’m doing a survey of 8 popular social login plugins for WordPress, including WordPress Social Login, Social Login, Social, LoginRadius, Users Ultra, WP-OAuth and Social Connect.

Whether you’re interested in a free light-weight plugin, a premium (paid) plugin, or a subscription-based plugin whose experts will custom tailor their solution to your needs, then you’ve come to the right spot.

The following is a table of results, as of this writing in November, 2014. Some of the info required investigation of the plugin’s source code.

WordPress Social Login Social Login Social LoginRadius Users Ultra WP-OAuth Janrain Social Login Social Connect
PLUGIN OVERVIEW
Developer: Miled Claude Schlesser / OneAll Alex King / Crowd Favorite / MailChimp LoginRadius Users Ultra Perry Butler Byron / Janrain Rodrigo Primo
Rating: 4.1 (135 reviews) 3.9 (235 reviews) 3.4 (108 reviews) 3.4 (113 reviews) 4.8 (129 reviews) 5.0 (2 reviews) 3.5 (78 reviews) 4.2 (110 reviews)
Requires WP version: 3.0+ 3.0+ 3.8+ 3.4+ 3.0.1+ 4.0+ 3.5+ 3.0+
Total number of downloads: 153,977 328,353 362,033 256,620 59,000 710 133,147 86,697
Number of downloads over 1 week: 2,216 (+1.4%) 1,677 (+0.5%) 4,227 (+1.2%) 2,354 (+0.9%) 3,132 (+5.3%) 207 (+34.3%) 47 (+0.03%) 232 (+0.26%)
Last updated: 9 days ago 29 days ago 331 days ago 20 days ago Today Today 90 days ago 68 days ago
Cost: Free Freemium or $8-$158 monthly Free Freemium or $150-$450 monthly Freemium or $50-$160 yearly Free Freemium or $10-$2,250 monthly Free
PLUGIN FEATURES AND LIMITATIONS
Social login included with free version: Yes Yes Yes No No Yes Yes Yes
Number of providers: 25+ 25+ 2 25+ 5  8 30+ 5
White label / unbranded: Yes Requires paid plan Yes Requires paid plan Yes Yes Requires paid plan Yes
Login / registration limits: No >2,500 users requires paid plan No No No No >2,500 users requires paid plan No
Site / domain usage limits: No No No No Paid plans allow usage on 1 site or unlimited sites No No No
Creates (registers) new WordPress user accounts automatically: Yes Yes Yes Yes Yes (Paid plan) Yes Yes Yes
Link third-party providers to WordPress user accounts: Yes Yes No Yes Yes (Paid plan) Yes Yes No
Works with existing user accounts: Yes Yes No Yes Yes Yes Yes Yes
Provides login widgets or shortcodes: Yes Yes No Yes Yes (Paid plan) Yes No Yes
Import friends, contacts, etc. from third-party providers: Yes No No No Yes (Paid plan) No Yes No
Social commenting: No No Yes Yes No No No No
Social sharing: No Yes Yes Yes No No Yes No
Includes login and registration tracking / stats: No No No No Yes (Paid plan) No No No
Customize where users are redirected after login/logout: No Yes No Yes Yes Yes No No
Compatible with WordPress Multisite: Yes (Paid plan)
Compatible with BuddyPress: Yes
Compatible with bbPress: Yes
Compatible with Theme My Login:
PLUGIN TECHNOLOGY AND SECURITY
Authentication method: OAuth OAuth OAuth OAuth OAuth, OpenID OAuth, OpenID Connect OAuth OAuth, OpenID
Users are authenticated through a proxy, middleman, single integration point or online service that sits between the WordPress site and the third-party providers: No Yes, OneAll Yes, MailChimp Yes, LoginRadius No No Yes, Janrain Engage No
Identifies authenticated users via their permanent unique user identifier: Yes, with email address No, identifies via email address No, identifies via username No, identifies via email address Yes, with email address Yes Yes No, identifies via email address
Requests and/or stores private or sensitive user info from the third-party: Yes, the user’s email address Yes, the user’s email address, avatar, full name, etc. Yes, the user’s username Yes, the user’s email address Yes, the user’s email address No No Yes, the user’s email address
An open-source library included with the plugin handles authentication: Yes, HybridAuth No No Yes, LoginRadius PHP SDK Yes, Google API PHP Client, LightOpenID, Twitter OAuth, etc. No No Yes, Facebook PHP SDK, LightOpenID
Uses an outdated or deprecated technology / library: No No No No Yes, LightOpenID No No Yes, LightOpenID
Calls third-party provider APIs that are secured with SSL via insecure (non-SSL) URLs: No No No No No No No Yes
Educates users/admins about good security practices when using the plugin: No No No No No Yes No No
Includes one or more settings related to security: No Yes No No No Yes No No
Warns admins when configuration changes may affect security: No Yes N/A N/A N/A Yes N/A N/A
Installs with and defaults to a secure configuration: No Yes N/A N/A N/A Yes N/A N/A
Mentions SSL / HTTPS at all: No Yes No Yes No Yes No No
Recommends the WordPress site to use an SSL certificate: No No No No No No No No
Requires the WordPress site to use an SSL certificate: No No No No No No No No
SSL features are enabled by default: No Yes N/A N/A N/A Yes N/A N/A
Performs SSL host verification: No No N/A No No Yes Yes No
Performs SSL peer verification: No No N/A No No Yes No No
Performance overhead – tested with P3 Performance Profiler (lower is better): 84%, 0.0362 sec 52%, 0.0107 sec 77%, 0.0354 sec 89%, 0.0705 sec 95%, 0.1087 sec 51%, 0.0114 sec 89%, 0.048 sec 77%, 0.0212 sec

Continue reading

Cascading Asynchronous Javascript and HTML (AJAH) Regions

This blog post is a snippet from my Cascading Asynchronous Javascript and HTML (AJAH) Regions sketch that was recently published to Google Drive.

cascading-async-regions Continue reading

How to Move Comments in WordPress 3.0 with phpMyAdmin

Many of the Move Comments plugins for WordPress do not seem to work properly in WordPress 3.0, so I needed a way to move comments around from one post/page to another, as well as retain any threaded/nested comments. One could always move comments by modifying the database directly with phpMyAdmin or something similar, and this is what I had to resort to. Modifying your WordPress database directly isn’t something you want to do every day, but sometimes it is completely unavoidable. It took me all of 5 minutes to figure this out, so it shouldn’t be too difficult for you either.

Continue reading

How to Use Custom PHP Functions and Shortcodes in WordPress

I touched on this subject before in my previous article titled WordPress Tip: the_category Without Links, which focuses on the WordPress get_category function, but I decided to write this article so I can focus more on the general implementation of PHP functions with WordPress, and so that people will have an easier time locating these tips via a web search.

Some WordPress plugins require you to add shortcodes to your pages/posts to utilize the plugin, so I wouldn’t be surprised if you were already using shortcodes. Whether or not you’ve had any experience using WordPress shortcodes, this tutorial has what you need to get started.

Continue reading

How to Use the_category Tag Without Links in WordPress

You see, the_category template tag outputs the name of every category a post belongs to, but the category names are linked to respective category pages that I do not want my visitors accessing. Here on GlassOcean.net I try to obscure the category pages that WordPress generates because they are not as customizable as I would like. Therefore, I needed a way to list the categories that a post belongs to without the links.

A Google search for “wordpress the_category without links” returned an article by Robert Mirabito titled How to remove link from the_category in WordPress, which led me to the understanding that I would need to use the get_the_category template tag instead of the the_category template tag. However, Robert’s example inserts a space character as the delimiter, and changing this delimiter to something else results in the delimiter appearing after the very last category. So if you used a comma character as the delimiter, you would end up with something like “Posted in Blog, Services,” which looks bad. This led to some more searching.

Continue reading