Closed (fixed)
Project:
Drupal.org security advisory coverage applications
Component:
module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Sep 2011 at 22:24 UTC
Updated:
20 Oct 2011 at 22:20 UTC
This module gives site visitors the option to register/login to Drupal using their GitHub account. The module provides a block for one-click-login. No other module authenticates users and connects them to GitHub. The module also provides an API function so that other modules can make use of the connection and access user info, repositories, followers etc from GitHub. The module was developed for a web developers community around traffic APIs and has been tested and will go live on that site.
Here is a link to the sandbox page.
git clone http://git.drupal.org/sandbox/Vikom/1292872.git github_connect
Drupal 7 only (right now).
Comments
Comment #1
aaronott commentedVicom,
Thanks for contributing this module. The code looks good and follows the coding standards, if I'm being picky there are a couple extra trailing spaces on some lines. You can see these using coder module set to minor.
One thing that I did notice was a questionable use of the _github_connect_save_github_user() function to merge an account that already exists. While I understand the idea to make it easier to merge the accounts, I see possible abuse with this functionality. Since the email that is sent when I connect is an email that I can easily change on my github account, I could potentially assign that address to another users email address and login with my github giving me full access to their account.
While I'm not sure the absolute best way to handle this (whether it's simply to return false and disallow the user to login via github or to require the user to provide their login password during the merge process) it is an issue that should be addressed before moving forward.
There are a couple error conditions that I've run into as well that leave the end-user a bit confused. These bugs I will open in the issue queue on your sandbox.
Finally, for usability sake, you might add the installation instructions referring to the "correct URLs" to the admin configuration page. With the ability to add a module on the module page, many people may not look for the readme.txt file itself to look for these details.
Thanks again for this contribution.
Comment #2
vikom commentedHi aaronott and thanks for a great review!
1. Trailing spaces removed
2. I didn't know that you could change your email address at GitHub without verifying it. Thanks for pointing that out. While that is not a security issue for GitHub it might be for people using their APi like in this case. So I'm thinking about posting an issue over there. To solve it the module now requires password from the user before merging accounts like you suggested.
3. Description updated in Admin settings page. I don't really understand what you mean with "With the ability to add a module on the module page"?
Comment #3
vikom commentedComment #4
aaronott commentedVikom,
Great work here. I really like the way you added the password to verify the local account prior to the account merge. Yes I probably wouldn't have noticed the security issue if it weren't for the fact that I didn't have an email address in my public facing Github profile.
In Drupal 7, the ability to add a module to a system directly from the admin/modules page was added.
Install through the Drupal interface. While it does make it easier for people to add modules, it also makes it less likely they will read any accompanying docs such as the README.txt file.
Thanks for adding the help text on the admin page describing how the Github side needs to be configured.
I'm going to mark this as RTBC. Thanks again for this contribution.
Comment #5
gregglesIt appears you are working in the "master" branch in git. You should ideally be working in a version specific branch. Please see the documentation about release naming conventions and creating a branch in git. This is a best practice but does not block a project application.
I noticed a couple of small code style issues, but none that should block an application. Things like:
* An extra newline between the docblock and the function.
* Functions without docblocks.
You mention that there is no module that provides this feature, but I believe the fundamental feature is OAuth login, right? There is the oauth connector module which provides the ability to login using any oauth based site.
Are there some features in this module that are specific to Github and would not be possible using OAuth Connector? Can you leverage the OAuth or OAuth connector modules and keep just the Github specific parts in this module?
I'm marking needs work to get an answer on the last piece about duplication but generally still think this should be RTBC once we find an answer to the overlap/duplication piece.
Comment #6
vikom commentedHi and thanks for the feedback.
Sorry for working in the master, thought I was suppose to do that while it was still Sandbox. I have now pushed 7.x-1.x
The initial plan for this module was that it should be a module depending on Connector module and using Oauth module. However Oauth module (and Oauth connector) does not support Oauth 2 which GitHub uses. There is a issue but no plan so far.
So I skipped the Oauth module but started on a port of the Connector module. I really like the idea of the Connector module but there was no development for D7. Unfourtunately i got stuck because I couldn't figure out which functionality should be in which module which made both modules seem messy. I contacted Voxpelli about this and he did not seem sure regarding the separation either. Also he responded that he wouldn't have time for working on a port for the Connector module.
I still would like this module to use Connector + Oauth but for that to happen as I see it we need not only a port of Connector but a rewrite also Oauth 2 support in Oauth. Voxpelli has invited me to become a co-maintainer of Oauth. And if so I might find the time to start working on a new branch with Oauth 2 support (I have a client that might need it). However I don't think a stable release would be possible for me to manage this year...
My unfinished port of Connector can be found on my GitHub.
Comment #7
vikom commentedI'll fix the linebreak and docblocks :)
Comment #8
gregglesThanks for your contribution, Vikom! Welcome to the community of project contributors on drupal.org.
I've granted you the git vetted user role which will let you promote this to a full project and also create new projects as either sandbox or "full" projects depending on which you feel is best.
Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.
Comment #9
vikom commentedProject page is now at: http://drupal.org/project/github_connect