hotsh / rstat.us

Simple microblogging network based on the ostatus protocol.
http://rstat.us/
Other
722 stars 215 forks source link

Fb users who don't have Fb usernames get Rstatus username of profile.php?id=<id> #52

Closed colindean closed 13 years ago

colindean commented 13 years ago

See this update for a user whom this affects.

Caught just watching /home.

colindean commented 13 years ago

More problems:

http://rstat.us/updates/4d8bf81e9a768f361b0005bc http://rstat.us/updates/4d8bf7ed9a768f361b0005b6

steveklabnik commented 13 years ago

That is horrific. Hm.

caleywoods commented 13 years ago

Yeah also trying to view their profile by clicking the link throws 404 but you probably already knew that :D

Valarissa commented 13 years ago

I've got a potential solution which I'll look into implementing next time I'm at my comp. Search the returned OAuth hash for the profile.php username. If found, concatenate the name and append _{id} So if John Doe signed up with profile.php?id=1354687 as their username, it would auto generate the username johndoe_1354687 to be used as their username instead. Thoughts?

Valarissa commented 13 years ago

Also, I recognize this as a flaw of facebook's that if they fix it, removing profile.php in the future, this would then no longer be an issue. But until fb learns better OAuth practices, we have to hack it s bit.

caleywoods commented 13 years ago

This would be ok if we allow users to change nicks but if not why alienate them by forcing numbers to be appended onto their names?

On Mar 26, 2011 12:12 PM, "Valarissa" < reply@reply.github.com> wrote:

I've got a potential solution which I'll look into implementing next time I'm at my comp. Search the returned OAuth hash for the profile.php username. If found, concatenate the name and append _{id} So if John Doe signed up with profile.php?id=1354687 as their username, it would auto generate the username johndoe_1354687 to be used as their username instead. Thoughts?

Reply to this email directly or view it on GitHub: https://github.com/hotsh/rstat.us/issues/52#comment_920658

Valarissa commented 13 years ago

Simple answer: unique ID. We could just concatenate the name, and if that fails prompt the user for a new username, but anything is better than nothing at this point. As it stands it creates a broken user, who can't even view their own user page.

caleywoods commented 13 years ago

Would it be fair to just ask for a username from fb users who come in with a profile id link? I'm torn between simplicity and user control.

On Mar 26, 2011 12:19 PM, "Valarissa" < reply@reply.github.com> wrote:

Simple answer: unique ID. We could just concatenate the name, and if that fails prompt the user for a new username, but anything is better than nothing at this point. As it stands it creates a broken user, who can't even view their own user page.

Reply to this email directly or view it on GitHub: https://github.com/hotsh/rstat.us/issues/52#comment_920671

steveklabnik commented 13 years ago

I vote 'ask for username'

Valarissa commented 13 years ago

Ok, with that said, I will look into asking users for a username that come in with that profile.php business. I'm at my computer now, so I may be able to get a solution up and running pretty soon.

LindseyB commented 13 years ago

I'd like to just ask for username, however, even if this is implemented is there an elegant way to handle existing users with broken usernames?

caleywoods commented 13 years ago

Can we get a rake task to look at where username like '%profile%' and have some sort of switch flipped to prompt them for a username?

Valarissa commented 13 years ago

Good question, is there a way to run a query against MongoDB to update the usernames? If not, is it possible to copy the information contained by a key to copy it elsewhere? I'm not exactly sure how NoSQL DBs really work.

Valarissa commented 13 years ago

I just sent a pull request which should handle this nasty little problem. I will look into the ability to set a flag which will handle people who already have this issue. I think I'll be checking to see if the username is set to this bollocks. Problem is, because of the nature of this username, I might not be able to send people to the typical /users/{user}/edit url because of the fact that their lovely username makes that a bit difficult.

Is there any possible way bounce to a one-off page so they can change their username themselves? Basically I'm thinking if I find that username string, I may be able to bounce them to an otherwise secure page (which checks to see if the person's username is defunct) that allows them to choose a username. This may take some time, but obviously would be worth it to save any status updates.

steveklabnik commented 13 years ago

Giving the #dickbar to facebook people

Closed by dfdf4b5101ed52b4fbd0b91fdfaaa72f129936b4

Valarissa commented 13 years ago

I'd like to point out that this isn't resolved yet. First point of contention, as it stands, users with the profile.php username cannot actually access /reset_username , they get booted to /

Furthermore, I've found that the reset_username business doesn't quite work. The /users/{username}/ page remains the same, a new one isn't created. This causes a problem where the profile.php?={id} people can't edit their info (as it remains the /users/profile.php?={id}/ which causes url errors, understandably), and no one can get to their users page. I'm looking into how to go about creating these new pages and removing the old ones, but sadly, it wasn't as easy as it seemed for this case.

steveklabnik commented 13 years ago

@valarissa I've reopened this issue.

I'm looking into how to go about creating these new pages and removing the old ones, but sadly, it wasn't as easy as it seemed for this case.

If you need help, we're all hanging out on IRC, freenode's #rstatus channel. Otherwise, one of us will get to it.

Thanks for clarifying.

Valarissa commented 13 years ago

Pull request with lovely unit tests and fully-up-to-date with master branch made. This should squash this bugger for good now.

Valarissa commented 13 years ago

This appears to be completely resolved now. I believe this thread can be closed.

steveklabnik commented 13 years ago

Closing, some extra pull requests fixed this.