Revision 4501a443

b/lib/backend.py
1463 1463
                  file_name)
1464 1464
    return False
1465 1465

  
1466
  allowed_files = [
1466
  allowed_files = set([
1467 1467
    constants.CLUSTER_CONF_FILE,
1468 1468
    constants.ETC_HOSTS,
1469 1469
    constants.SSH_KNOWN_HOSTS_FILE,
1470 1470
    constants.VNC_PASSWORD_FILE,
1471
    ]
1471
    constants.RAPI_CERT_FILE,
1472
    constants.RAPI_USERS_FILE,
1473
    ])
1474

  
1475
  for hv_name in constants.HYPER_TYPES:
1476
    hv_class = hypervisor.GetHypervisor(hv_name)
1477
    allowed_files.update(hv_class.GetAncillaryFiles())
1472 1478

  
1473 1479
  if file_name not in allowed_files:
1474 1480
    logging.error("Filename passed to UploadFile not in allowed"

Also available in: Unified diff