Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix security issues reported by Dependabot for version 4#5514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
kretajak wants to merge3 commits intowebpack:version-4
base:version-4
Choose a base branch
Loading
fromkretajak:fix/security-issues

Conversation

@kretajak
Copy link

  • This is abugfix
  • This is afeature
  • This is acode refactor
  • This is atest update
  • This is adocs update
  • This is ametadata update

For Bugs and Features; did you add new tests?

Fixes Security issues present in version 4 ofwebpack-dev-server. Similar fixes were already merged into version 5 ofwebpack-dev-server.

Motivation / Use-Case

Fix issues reported by Dependabot:

Breaking Changes

It is breaking change but it's security wise. Similar changes are already in 5.x.x branch. See commitsd2575ad and5c9378b

Additional Info

slorber, nikwen, juanitosvq, chrislewis2, matsest, stormmuller, FiveOFive, cylewaitforit, Elnadrion, o-l-a-v, and 3 more reacted with thumbs up emojijuanitosvq, mzbu, and mkabir-evertz reacted with eyes emoji
constheaders=
/**@type {{ [key: string]: string | undefined }} */
(req.headers);
if(

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Recently we added some fixes here to skip check forallowedHost, please add it here

Copy link
Author

@kretajakkretajakJun 9, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It seems not that straightforward. To me bigger effort is needed to incorporate changes from03d1214. This PR uses functions defined in previous commits not available in line 4.

If it's not a problem, I would consider merging this PR and creating separate PR for task you mentioned.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@kretajak let's include03d1214 here, otherwise in some cases it will be impossible to setup a new version and we can merge

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@kretajak let me know if you need help backporting that commit. I could try to add it on top of your existing PR if you don't have time to. We have at least 3 Docusaurus issues asking us to solve this security warning so happy to help and get this solved asap.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I'm currently trying to backport that commit. I'll inform you whether I was able to make it.

slorber reacted with thumbs up emoji
Copy link
Author

@kretajakkretajakJun 11, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I have added new commit which should move us a bit closer. Seems like also changes from6045b1e might be required as they are tightly connected to03d1214.

@slorber feel free to continue the work.

slorber reacted with thumbs up emoji
@slorber
Copy link

Thanks, we'd also appreciate a backport for Docusaurus because our current minor supports Node 18.0, incompatible with dev server v5, and all newly initialized Docusaurus sites will get dev server v4.

We could bump to the latest Node 18like Astro did recently (since it reached end of life) but if it's possible to avoid that it's better to not force our users to upgrade Node.js when upgrading a minor version (and I'd rather not release a new major version just for that security fix)

facebook/docusaurus#11252 (comment)

wellwelwel, stormmuller, and jellyfith reacted with thumbs up emoji

@pikachugb
Copy link

Hello :) Is there an ETA for the release of potentially version 4.15.3 with the changes from this PR?

@linux-foundation-easycla
Copy link

linux-foundation-easyclabot commentedJun 11, 2025
edited
Loading

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: sapphi-red / name: 翠 (5ba835f,ba2e692)
  • ✅ login: alexander-akait / name: Alexander Akait (8de7782)

hostname==="localhost"||
hostname.endsWith(".localhost")||
hostname===this.options.host
:true;
Copy link
Author

@kretajakkretajakJun 11, 2025
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I believe there is a bug in version 5 ofweboack-dev-server.false is returned there, but my guess is that whenvalidateHost isfalse we should bypass checking and returntrue here.

Above function when called:isValidHost({ host: '127.0.0.1 }, 'host', validateHost = false) returnfalse while it should returntrue. I assume that is the reason so many tests of6045b1e were changed.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@kretajak it is not a bug, because 127.0.0.1 can be used for attack, you should manually set127.0.0.1 inallowedHosts for CORS requests, i.e. you openedbad-site.com, this this site can try to connect tows://localhost:3000 and without such headers non chromium and old chromium browsers will connect to your websockets and can take your source code (in some cases)

kretajak reacted with thumbs up emoji
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Okey. I reverted it tofalse.

@alexander-akait
Copy link
Member

@kretajak Can you change your email in the last commin, CLA is failed, we can't merge commits without CLA

@pikachugb This week

kretajak reacted with thumbs up emojipikachugb and wrslatz reacted with heart emojislorber reacted with rocket emoji

@kretajakkretajak marked this pull request as draftJune 12, 2025 11:39
@kretajak
Copy link
Author

I have converted it to draft as it's incomplete.

@wissemayadi21
Copy link

hello please when this version will be published ?

pikachugb, paulo-at-fox, dharaneesh127, yoavfranco, and charliie-dev reacted with eyes emoji

@dharaneesh127
Copy link

@hiroppy@anshumanv@snitin315 could you guys please review the PR, and if good can it be published ?

@kretajak
Copy link
Author

kretajak commentedJun 17, 2025
edited
Loading

As I wrote here:#5514 (comment) backporting these extra changes is not straightforward. I would recommend dropping the last commit and merge this PR with the very first two commits, as they are essentially fixing the security issue.

chrislewis2 and yoavfranco reacted with thumbs up emojiwissemayadi21, pikachugb, abelrischa, and yoavfranco reacted with eyes emoji

@wissemayadi21
Copy link

that sounds good , we looking forward to get this release.

pikachugb, dharaneesh127, abelrischa, and yoavfranco reacted with rocket emoji

@alexander-akait
Copy link
Member

@kretajak Do you need any help with this?

@kretajak
Copy link
Author

@kretajak Do you need any help with this?

That would be great, if you feel changes from03d1214 and6045b1e must be incorporated here.

wissemayadi21, pikachugb, chrislewis2, and jpmckinney reacted with eyes emoji

@pikachugb
Copy link

pikachugb commentedJul 9, 2025
edited
Loading

Any news on this one?@kretajak@alexander-akait

yoavfranco, juanitosvq, johnmcase, OkuraKenG, Claw666, apaolelli, vakulinina, charliie-dev, and wissemayadi21 reacted with eyes emoji

@kretajak
Copy link
Author

Hi, I'm not able to continue the effort, as I do not feel confident enough to incorporate changes from03d1214 and6045b1e.

slorber, wissemayadi21, jellyfith, and OkuraKenG reacted with thumbs up emojijellyfith reacted with eyes emoji

@hilalevx
Copy link

hi :) is there an ETA to the new 4 version release?

vakulinina reacted with eyes emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@alexander-akaitalexander-akaitalexander-akait approved these changes

@hiroppyhiroppyAwaiting requested review from hiroppyhiroppy is a code owner

@snitin315snitin315Awaiting requested review from snitin315snitin315 is a code owner

@anshumanvanshumanvAwaiting requested review from anshumanvanshumanv is a code owner

+1 more reviewer

@slorberslorberslorber left review comments

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

8 participants

@kretajak@slorber@pikachugb@alexander-akait@wissemayadi21@dharaneesh127@hilalevx@sapphi-red

[8]ページ先頭

©2009-2025 Movatter.jp