Merge pull request #152 from zach-chai/meeting_name_strip

strip spaces and newlines from meeting names
This commit is contained in:
Zachary Chai 2017-03-21 14:01:28 -04:00 committed by GitHub
commit 8cf75b6051
2 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ class LandingController < ApplicationController
private
def render_meeting
@meeting_id = params[:id]
@meeting_id = params[:id].strip
params[:action] = 'meetings'
render :action => 'meetings'
end
@ -71,7 +71,7 @@ class LandingController < ApplicationController
end
if @user.encrypted_id != params[:id]
@meeting_id = params[:id]
@meeting_id = params[:id].strip
end
@meeting_running = bbb_get_meeting_info("#{@user.encrypted_id}-#{@meeting_id}")[:returncode]
@main_room = @meeting_id.blank? || @meeting_id == @user.encrypted_id

View File

@ -44,7 +44,7 @@ Rails.application.routes.draw do
post '/:room_id/:id/callback', to: 'bbb#callback' #, defaults: {format: 'json'}
# routes shared between meetings and rooms
get '/(:room_id)/:id/join', to: 'bbb#join', defaults: {room_id: nil, format: 'json'}
get '/(:room_id)/:id/join', to: 'bbb#join', defaults: {room_id: nil, format: 'json'}, :constraints => {:id => /[^\/]+/} # override the constraint to allow '.' and disallow '/'
get '/(:room_id)/:id', to: 'landing#resource', as: :meeting_room, defaults: {room_id: nil}, :constraints => {:id => /[^\/]+/} # override the constraint to allow '.' and disallow '/'
end