Skip to content

Commit be2e2a7

Browse files
Fixed another regex problem
1 parent 102a90e commit be2e2a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/pusher/channel.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def authenticate(socket_id, custom_data = nil)
170170
private
171171

172172
def validate_socket_id(socket_id)
173-
unless socket_id && /^\d+\.\d+$/.match(socket_id)
173+
unless socket_id && /\A\d+\.\d+\z/.match(socket_id)
174174
raise Pusher::Error, "Invalid socket ID #{socket_id.inspect}"
175175
end
176176
end

0 commit comments

Comments
 (0)