GRN2-225, GRN2-227: Images sent by Office365 Institutional accounts break the rooms (#753)

* Validate profile image url

* Add rake task to migrate old office365 accounts
This commit is contained in:
shawn-higgins1
2019-08-21 14:23:00 -04:00
committed by Jesus Federico
parent 915ed9381d
commit 3d2a0a060b
3 changed files with 42 additions and 1 deletions

View File

@ -17,6 +17,7 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
require 'bbb_api'
require 'uri'
require 'i18n/language/mapping'
module ApplicationHelper
@ -139,4 +140,11 @@ module ApplicationHelper
def google_analytics_url
"https://www.googletagmanager.com/gtag/js?id=#{ENV['GOOGLE_ANALYTICS_TRACKING_ID']}"
end
def valid_url?(input)
uri = URI.parse(input)
!uri.host.nil?
rescue URI::InvalidURIError
false
end
end