Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
cee2cf37
Unverified
Commit
cee2cf37
authored
Jul 26, 2022
by
JJ Kasper
Committed by
GitHub
Jul 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ensure dangerouslyAllowSVG is passed correctly (#39031)
parent
fd7bd124
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
webpack-config.ts
packages/next/build/webpack-config.ts
+1
-0
security.js
test/integration/production/test/security.js
+2
-3
No files found.
packages/next/build/webpack-config.ts
View file @
cee2cf37
...
...
@@ -1571,6 +1571,7 @@ export default async function getBaseWebpackConfig(
imageSizes
:
config
.
images
.
imageSizes
,
path
:
config
.
images
.
path
,
loader
:
config
.
images
.
loader
,
dangerouslyAllowSVG
:
config
.
images
.
dangerouslyAllowSVG
,
experimentalUnoptimized
:
config
?.
experimental
?.
images
?.
unoptimized
,
experimentalFuture
:
config
.
experimental
?.
images
?.
allowFutureImage
,
...(
dev
...
...
test/integration/production/test/security.js
View file @
cee2cf37
...
...
@@ -321,9 +321,8 @@ module.exports = (context) => {
try
{
browser
=
await
webdriver
(
context
.
appPort
,
'/svg-image'
)
await
browser
.
eval
(
`document.getElementById("img").scrollIntoView()`
)
expect
(
await
browser
.
elementById
(
'img'
).
getAttribute
(
'src'
)
).
toContain
(
'xss.svg'
)
const
src
=
await
browser
.
elementById
(
'img'
).
getAttribute
(
'src'
)
expect
(
src
).
toMatch
(
/_next
\/
image
\?
.*xss
\.
svg/
)
expect
(
await
browser
.
elementById
(
'msg'
).
text
()).
toBe
(
'safe'
)
browser
=
await
webdriver
(
context
.
appPort
,
...
...
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