Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.5k
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
base:version-4
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
| constheaders= | ||
| /**@type {{ [key: string]: string | undefined }} */ | ||
| (req.headers); | ||
| if( |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
slorber commentedJun 6, 2025
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) |
pikachugb commentedJun 11, 2025
Hello :) Is there an ETA for the release of potentially version 4.15.3 with the changes from this PR? |
linux-foundation-easyclabot commentedJun 11, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
| hostname==="localhost"|| | ||
| hostname.endsWith(".localhost")|| | ||
| hostname===this.options.host | ||
| :true; |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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.
@kretajak Can you change your email in the last commin, CLA is failed, we can't merge commits without CLA @pikachugb This week |
I have converted it to draft as it's incomplete. |
wissemayadi21 commentedJun 16, 2025
hello please when this version will be published ? |
dharaneesh127 commentedJun 17, 2025
@hiroppy@anshumanv@snitin315 could you guys please review the PR, and if good can it be published ? |
kretajak commentedJun 17, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
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. |
wissemayadi21 commentedJun 18, 2025
that sounds good , we looking forward to get this release. |
@kretajak Do you need any help with this? |
pikachugb commentedJul 9, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Any news on this one?@kretajak@alexander-akait |
hilalevx commentedOct 15, 2025
hi :) is there an ETA to the new 4 version release? |
For Bugs and Features; did you add new tests?
Fixes Security issues present in version 4 of
webpack-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