# Bug in plug-in open\_id\_authentication

**URL:** <https://www.ruby-forum.com/t/bug-in-plug-in-open-id-authentication/161423>\
**Category:** Rails\
**Created:** [February 26, 2009, 11:09am UTC](https://www.ruby-forum.com/t/bug-in-plug-in-open-id-authentication/161423 "2009-02-26T11:09:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vikrant](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vikrant](https://www.ruby-forum.com/u/vikrant)\
**Post date:** [February 26, 2009, 11:09am UTC](https://www.ruby-forum.com/t/bug-in-plug-in-open-id-authentication/161423/1 "2009-02-26T11:09:41Z")

</div>

Hi,  
There is a little bug in open\_id\_authentication plug-in at line 87 of  
file lib/open\_id\_authentication.rb

identifier = “http://#{identifier}” unless identifier =~ /^http/i

this line will silently ignore the uri “[httpd.apache.org](http://httpd.apache.org)” without  
normalising it to “[http://httpd.apache.org/](http://httpd.apache.org/)”

at present, writing OpenIdAuthentication.normalize\_identifier  
(‘[httpd.apache.org](http://httpd.apache.org)’) raises a NoMethodError.

Proposed solution is to replace /^http/i with /^http:/i

identifier = “http://#{identifier}” unless identifier =~ /^http:/i

> <https://github.com/rails/open_id_authentication/blob/e6df78367b257886021785ba0260a4b5a4eca793/lib/open_id_authentication.rb#L87>

I’m reporting this bug here, because don’t know how to submit patch  
(or whatever we call it) for Git repository. Also guys at  
[lighthouseapp.com](http://lighthouseapp.com) will let you sign-in with an OpenID but won’t let  
you sign-up with one! So bad.

---

<div class="post-metadata">

**Author:** ![vikrant](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/cc9497/32.png) [@vikrant](https://www.ruby-forum.com/u/vikrant)\
**Post date:** [March 16, 2009, 3:04pm UTC](https://www.ruby-forum.com/t/bug-in-plug-in-open-id-authentication/161423/2 "2009-03-16T15:04:47Z")

</div>

there is a bug, it actually should be -  
identifier = “http://#{identifier}” unless identifier =~ /^https?:/i
