Skip to content

Commit 2323bf3

Browse files
committed
Merge branch 'master' into publicPath-output
2 parents 89eb799 + 0d22a08 commit 2323bf3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+5078
-2990
lines changed

.cspell.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@
7070
"commitlint",
7171
"eslintcache",
7272
"hono",
73-
"privkey"
73+
"privkey",
74+
"geomanist"
7475
],
7576
"ignorePaths": [
7677
"CHANGELOG.md",

.github/workflows/dependency-review.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: "Checkout Repository"
12-
uses: actions/checkout@v3
12+
uses: actions/checkout@v4
1313
- name: "Dependency Review"
14-
uses: actions/dependency-review-action@v3
14+
uses: actions/dependency-review-action@v4

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,20 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
## [5.2.1](https://github.com/webpack/webpack-dev-server/compare/v5.2.0...v6.0.0) (2025-03-26)
6+
7+
### Security
8+
9+
* cross-origin requests are not allowed unless allowed by `Access-Control-Allow-Origin` header
10+
* requests with an IP addresses in the `Origin` header are not allowed to connect to WebSocket server unless configured by `allowedHosts` or it different from the `Host` header
11+
12+
The above changes may make the dev server not work if you relied on such behavior, but unfortunately they carry security risks, so they were considered as fixes.
13+
14+
### Bug Fixes
15+
16+
* prevent overlay for errors caught by React error boundaries ([#5431](https://github.com/webpack/webpack-dev-server/issues/5431)) ([8c1abc9](https://github.com/webpack/webpack-dev-server/commit/8c1abc903ab444d9ce99e567b9a6c603e1ec06be))
17+
* take the first network found instead of the last one, this restores the same behavior as 5.0.4 ([#5411](https://github.com/webpack/webpack-dev-server/issues/5411)) ([ffd0b86](https://github.com/webpack/webpack-dev-server/commit/ffd0b86b790d372f90e17aea92cfd9def83fee96))
18+
519
## [5.2.0](https://github.com/webpack/webpack-dev-server/compare/v5.1.0...v5.2.0) (2024-12-11)
620

721

client-src/socket.js

+7-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ let maxRetries = 10;
2222
// eslint-disable-next-line import/no-mutable-exports
2323
export let client = null;
2424

25+
let timeout;
26+
2527
/**
2628
* @param {string} url
2729
* @param {{ [handler: string]: (data?: any, params?: any) => any }} handlers
@@ -33,6 +35,10 @@ const socket = function initSocket(url, handlers, reconnect) {
3335
client.onOpen(() => {
3436
retries = 0;
3537

38+
if (timeout) {
39+
clearTimeout(timeout);
40+
}
41+
3642
if (typeof reconnect !== "undefined") {
3743
maxRetries = reconnect;
3844
}
@@ -57,7 +63,7 @@ const socket = function initSocket(url, handlers, reconnect) {
5763

5864
log.info("Trying to reconnect...");
5965

60-
setTimeout(() => {
66+
timeout = setTimeout(() => {
6167
socket(url, handlers, reconnect);
6268
}, retryInMs);
6369
}

examples/.assets/style.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ table {
7474
code {
7575
background-color: rgba(70, 94, 105, 0.06);
7676
border-radius: 3px;
77-
font-family: "Source Code Pro", Consolas, "Liberation Mono", Menlo, Courier,
78-
monospace;
77+
font-family:
78+
"Source Code Pro", Consolas, "Liberation Mono", Menlo, Courier, monospace;
7979
font-size: 1.44rem;
8080
margin: 0;
8181
max-width: 100%;

0 commit comments

Comments
 (0)