forked from External/greenlight
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:
committed by
Jesus Federico
parent
915ed9381d
commit
3d2a0a060b
@ -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
|
||||
|
Reference in New Issue
Block a user