Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Dots in usernames (and likely titles) break links #126

Open
JN-Jones opened this issue Apr 30, 2015 · 10 comments
Open

Dots in usernames (and likely titles) break links #126

JN-Jones opened this issue Apr 30, 2015 · 10 comments
Labels
Milestone

Comments

@JN-Jones
Copy link
Contributor

As the dot is used as url seperator it breaks things: http://mybb2.mybb.ninja/user/Paul%20H..5
It's likely that the same happens with forum and topic titles and probably some other slugged links.

@JN-Jones JN-Jones added the t:bug label Apr 30, 2015
@euantorano
Copy link
Member

Anywhere using the Laravel string utils class should be fine as far as I'm aware. The user profiles should be changed to include a slug in the users table, as otherwise other special characters will also cause issues.

On 30 Apr 2015, at 19:38, Jones [email protected] wrote:

As the dot is used as url seperator it breaks things: http://mybb2.mybb.ninja/user/Paul%20H..5
It's likely that the same happens with forum and topic titles and probably some other slugged links.


Reply to this email directly or view it on GitHub.

@JN-Jones
Copy link
Contributor Author

Yeah, all cases should be rechecked though. Just noticed this on the demo board.

@euantorano
Copy link
Member

Yeah, would be a good idea. Just checked the Str class, looks like it should be fine: https://github.com/laravel/framework/blob/5.0/src/Illuminate/Support/Str.php#L286

@JN-Jones
Copy link
Contributor Author

I'd simply add a twig filter slug then which we would need to call when generating the user profile link.

@euantorano
Copy link
Member

Could do, or could save the time required to do so by just saving it in the DB ;)

@JN-Jones
Copy link
Contributor Author

JN-Jones commented May 4, 2015

Also note that the slug should be properly encoded, <script>alert(0)</script> also breaks the link atm.

@ATofighi ATofighi added this to the Alpha 1 milestone May 5, 2015
@euantorano
Copy link
Member

This should now be fixed with the URL changes, correct?

@JN-Jones
Copy link
Contributor Author

I'll test it as soon as I got my installation back running

@JN-Jones
Copy link
Contributor Author

JN-Jones commented Nov 4, 2016

While topic links work now there are still issues with usernames. Note that it changed from dots to slashes so eg Test/er can't access his profile @euantorano

@euantorano
Copy link
Member

euantorano commented Nov 4, 2016

Damnit. The username should be slugified (which isn't a work, but Test/er should become test-er) for all links, same with any slugs used in URLs.

I'm not sure if Laravel's slug method handles that (I think it does), or if the various URL generating functions make use of it...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants