Alexandre Bougakov (bougakov) wrote in lj_dev,
Alexandre Bougakov
bougakov
lj_dev

Uderscore-dash ambiguity and OpenID

Hello,

I've created a small service website for a LJ community. I use Perl Net::OpenID::JanRain::Consumer library to authenticate LJ users on it.

I've noticed a problem with the users who have underscore symbol in their LJ usernames. If I do verify regular URI such as http://foo.livejournal.com, the resulting identity_uri is the same, http://foo.livejournal.com. When I try different combinations with underscores, the stuff gets more complicated:

a) foo_bar.livejournal.com => foo-bar.livejournal.com (notice that underscore gets replaced with dash)

b) foo_.livejournal.com => users.livejournal.com/foo_/ (domain changes to users.livejournal.com)

c) _foo_.livejournal.com => users.livejournal.com/_foo_/ (same behaviour)

d) _foo.livejournal.com => users.livejournal.com/_foo/ (same behaviour)

e) ___foo_bar_baz_.livejournal.com => users.livejournal.com/___foo_bar_baz_/ (same behaviour)

f) foo_bar_baz.livejournal.com => foo-bar-baz.livejournal.com/ (all underscores get replaced with dash)

g) foo-bar.livejournal.com => foo-bar.livejournal.com/ (remains unchanged)

My questions:

- have I checked all possible variants or are there other kinds of LJ usernames that its OpenID server will treat the different way?
- how does LJ handle the situations when both foo-bar and foo_bar users exist? Can this happen or not?
- is there a formal description of the ways LJ handles usernames with underscore symbol(s)?

Apologies if it is not the right community to ask about OpenID problems. Please point me to the right one in that case.
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 5 comments