FIX: Strip remote url before import. (#6762)

This commit is contained in:
Bianca Nenciu
2018-12-17 16:27:49 +02:00
committed by Régis Hanol
parent 22cea9ce90
commit 1023003eba
2 changed files with 9 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class RemoteTheme < ActiveRecord::Base
end
def self.import_theme(url, user = Discourse.system_user, private_key: nil, branch: nil)
importer = ThemeStore::GitImporter.new(url, private_key: private_key, branch: branch)
importer = ThemeStore::GitImporter.new(url.strip, private_key: private_key, branch: branch)
importer.import!
theme_info = JSON.parse(importer["about.json"])