1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Merge pull request #3097 from ansible/jakemcdermott-sanitize-jdetails

sanitize reflected user input on job details page

Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
softwarefactory-project-zuul[bot] 2019-01-29 21:34:32 +00:00 committed by GitHub
commit 44819987f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -114,13 +114,14 @@ function getVerbosityDetails () {
}
function getEnvironmentDetails (virtualenv) {
const value = virtualenv || resource.model.get('custom_virtualenv');
const customVirtualenv = virtualenv || resource.model.get('custom_virtualenv');
if (!value || value === '') {
if (!customVirtualenv || customVirtualenv === '') {
return null;
}
const label = strings.get('labels.ENVIRONMENT');
const value = $filter('sanitize')(customVirtualenv);
return { label, value };
}
@ -345,6 +346,7 @@ function getInventoryScmDetails (updateId, updateStatus) {
const link = `/#/projects/${projectId}`;
const jobTooltip = strings.get('tooltips.INVENTORY_SCM_JOB');
const tooltip = strings.get('tooltips.INVENTORY_SCM');
const value = $filter('sanitize')(projectName);
let icon;
@ -354,7 +356,7 @@ function getInventoryScmDetails (updateId, updateStatus) {
icon = `fa icon-job-${status}`;
}
return { label, link, icon, jobLink, jobTooltip, tooltip, value: projectName };
return { label, link, icon, jobLink, jobTooltip, tooltip, value };
}
function getSCMRevisionDetails () {