Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
507ce12d
Commit
507ce12d
authored
Jul 16, 2020
by
Fernando
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add encodeURIComponent to fuzzing component
* Add call to encode job name
parent
0937bbe6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
3 deletions
+9
-3
ee/app/assets/javascripts/security_dashboard/components/fuzzing_artifacts_download.vue
...urity_dashboard/components/fuzzing_artifacts_download.vue
+3
-1
ee/spec/frontend/security_dashboard/components/fuzzing_artifacts_download_spec.js
...y_dashboard/components/fuzzing_artifacts_download_spec.js
+6
-2
No files found.
ee/app/assets/javascripts/security_dashboard/components/fuzzing_artifacts_download.vue
View file @
507ce12d
...
...
@@ -28,7 +28,9 @@ export default {
},
methods
:
{
artifactDownloadUrl
(
job
)
{
return
`/api/v4/projects/
${
this
.
projectId
}
/jobs/artifacts/
${
job
.
ref
}
/download?job=
${
job
.
name
}
`
;
return
`/api/v4/projects/
${
this
.
projectId
}
/jobs/artifacts/
${
job
.
ref
}
/download?job=
${
encodeURIComponent
(
job
.
name
)}
`
;
},
},
};
...
...
ee/spec/frontend/security_dashboard/components/fuzzing_artifacts_download_spec.js
View file @
507ce12d
...
...
@@ -45,7 +45,9 @@ describe('Filter component', () => {
});
it
(
'
should render with href set to the correct filepath
'
,
()
=>
{
const
href
=
`/api/v4/projects/
${
projectId
}
/jobs/artifacts/
${
jobs
[
0
].
ref
}
/download?job=
${
jobs
[
0
].
name
}
`
;
const
href
=
`/api/v4/projects/
${
projectId
}
/jobs/artifacts/
${
jobs
[
0
].
ref
}
/download?job=
${
encodeURIComponent
(
jobs
[
0
].
name
)}
`
;
expect
(
wrapper
.
find
(
GlButton
).
attributes
(
'
href
'
)).
toBe
(
href
);
});
});
...
...
@@ -64,7 +66,9 @@ describe('Filter component', () => {
it
(
'
should render with href set to the correct filepath for every element
'
,
()
=>
{
const
wrapperArray
=
wrapper
.
findAll
(
GlDropdownItem
);
wrapperArray
.
wrappers
.
forEach
((
_
,
index
)
=>
{
const
href
=
`/api/v4/projects/
${
projectId
}
/jobs/artifacts/
${
jobs
[
index
].
ref
}
/download?job=
${
jobs
[
index
].
name
}
`
;
const
href
=
`/api/v4/projects/
${
projectId
}
/jobs/artifacts/
${
jobs
[
index
].
ref
}
/download?job=
${
encodeURIComponent
(
jobs
[
index
].
name
)}
`
;
expect
(
wrapperArray
.
at
(
index
).
attributes
().
href
).
toBe
(
href
);
});
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment