mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Only permit yaml.safe_loading of data
Event trusted data, belt + suspenders method.
This commit is contained in:
@@ -191,11 +191,11 @@ def main(argv):
|
||||
annotate('init_start', 'Loading GRT configuration...')
|
||||
try:
|
||||
with open(args.config) as handle:
|
||||
config = yaml.load(handle)
|
||||
config = yaml.safe_load(handle)
|
||||
except Exception:
|
||||
logging.info('Using default GRT configuration')
|
||||
with open(sample_config) as handle:
|
||||
config = yaml.load(handle)
|
||||
config = yaml.safe_load(handle)
|
||||
annotate('init_end')
|
||||
|
||||
REPORT_DIR = args.report_directory
|
||||
|
||||
@@ -28,11 +28,11 @@ def main(argv):
|
||||
logging.info('Loading GRT configuration...')
|
||||
try:
|
||||
with open(args.config) as handle:
|
||||
config = yaml.load(handle)
|
||||
config = yaml.safe_load(handle)
|
||||
except Exception:
|
||||
logging.info('Using default GRT configuration')
|
||||
with open(sample_config) as handle:
|
||||
config = yaml.load(handle)
|
||||
config = yaml.safe_load(handle)
|
||||
|
||||
REPORT_DIR = args.report_directory
|
||||
GRT_URL = config['grt']['url'].rstrip('/') + '/'
|
||||
|
||||
Reference in New Issue
Block a user