Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[5.3] Allow the substrings 'private-' or 'presence-' within private/presence channel names #16353

Merged
merged 1 commit into from
Nov 11, 2016

Conversation

jalipert
Copy link

Fixed an issue that prevented authentication in private or presence channels containing the words 'private' or 'presence' in their channel names.

…hannels containing the words 'private' or 'presence' in their channel names
@GrahamCampbell GrahamCampbell changed the title Fixed an issue that prevented authentication in private or presence broadcast channels [5.3] Fixed an issue that prevented authentication in private or presence broadcast channels Nov 10, 2016
@jalipert jalipert changed the title [5.3] Fixed an issue that prevented authentication in private or presence broadcast channels [5.3] Allow the substrings 'private-' or 'presence-' within private/presence channel names Nov 10, 2016
@jalipert
Copy link
Author

This issue got me when first trying to implement private broadcasting channels and I happened to name my channel 'test-private-channel' (seemed like a reasonable name at the time). I was unable to authenticate and traced the issue to a global string replace in the channel names.

@taylorotwell
Copy link
Member

But you're not replacing the first private-, only presence-... ? This is different from current behavior.

@jalipert
Copy link
Author

jalipert commented Nov 11, 2016

Yes I am, in lines 46 and 54 in the two files, respectively. Maybe it would be more clear if the second part of my change was in an "else" block?

If the channel name starts with "private-" I'm replacing the first occurrence of "private-". Otherwise, I'm replacing the first occurrence of "presence-". Due to the preceding section, we already know that it starts with one of those strings. And as far as I know, there's no clear way to replace one or the other in a one-liner.

@taylorotwell taylorotwell merged commit db8dd34 into laravel:5.3 Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants