Should this module be marked as deprecated in favour of http://drupal.org/project/persona ?

See #1797432: Merge with BrowserID module

Comments

icecreamyou’s picture

I noticed that the Persona module now has a stable release (congratulations) -- I am planning to do a code review as soon as I get a chance and move forward with this accordingly.

jbrown’s picture

Okay - it currently disables the page cache, but I'll have this fixed very soon. Perhaps wait until 7.x-1.2?

jbrown’s picture

I've released 7.x-1.2 - I'd be honoured for you to review it: http://drupal.org/node/1970726

icecreamyou’s picture

Okay. I'll try to get some time this weekend.

icecreamyou’s picture

I apologize for the delay -- I should have this done by the end of the week.

icecreamyou’s picture

Status: Active » Fixed

Looks good. I changed BrowserID project page. A couple of comments below -- but I also want to note that I'm impressed with the frequency of updates to the Persona module and the rate at which it has been improving. :)

  • There are a couple of places in persona.module in which variable_get() needs a default value as its second parameter (whenever the variable in question is not a Persona one, like lines 77 and 80).
  • Instead of using relativeURL() in the JavaScript, you should use url() in the PHP and pass the fully qualified URL to the JS as a setting. This makes sure that URLs have exactly the right structure Drupal is using, which is important because there are all kinds of things that can change URL structure (variations of multilingual URLs, subsites, folders, URL rewriting...).
  • I think access to the token-generation page should be throttled so someone malicious can't generate a bunch of sessions.
  • Some strings currently use double quotes and some use single quotes; ideally usage should be consistent
  • user/register, user/login, and user/password should probably be replaced rather than removed completely in takeover mode, since some modules explicitly redirect users to those paths.
  • persona.module line 271 should check isset($response['email']) to avoid making assumptions about what the server returns
  • _persona_existing_account_sign_in() should probably have a more descriptive error message than "you are not allowed to sign in at this time" to indicate why this error happened.
  • persona_sign_in() should probably have an option to redirect to a partially-filled-out registration page for non-registered users. This behavior is useful in the case when site administrators want users to fill out additional mandatory information before fully registering. (Here is an example.)
  • I believe $_SERVER['SERVER_NAME'] . ':' . $_SERVER['SERVER_PORT'] should be a secure alternative to $_SERVER['HTTP_HOST'].

All these things are pretty minor issues. Nice work. I do have one question: what happens if the user has JS disabled and the site has "takeover" mode enabled?

jbrown’s picture

Thanks so much Isaac! I pasted your code review into a new issue for the Persona module: #1986722: Review IceCreamYou's code review

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.