[PR #7015] [CLOSED] chore(deps): bump github.com/valyala/fasthttp from 1.76.0 to 1.77.0 #6577

Closed
opened 2026-11-02 04:09:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/7015
Author: @dependabot[bot]
Created: 10/29/2026
Status: ❌ Closed

Base: main ← Head: dependabot/go_modules/github.com/valyala/fasthttp-1.77.0


📝 Commits (1)

  • c1b2b22 chore(deps): bump github.com/valyala/fasthttp from 1.76.0 to 1.77.0

📊 Changes

2 files changed (+3 additions, -3 deletions)

View changed files

📝 go.mod (+1 -1)
📝 go.sum (+2 -2)

📄 Description

Bumps github.com/valyala/fasthttp from 1.76.0 to 1.77.0.

Release notes

Sourced from github.com/valyala/fasthttp's releases.

v1.77.0

v1.77.0 strengthens static-file confinement, fixes hijacked connection handling, and improves HTTP and cookie compatibility. It also adds an opt-in bounded stream reader, configurable body-buffer retention, and deadline support for adapted net/http handlers.

Static-file symlink behavior changes by default. The default OS-backed FS now rejects symlinks that leave Root or CompressRoot, as well as absolute symlinks even when their targets are inside the root. Relative symlinks that stay inside the root continue to work. Set FS.AllowSymlinksOutsideRoot to restore the previous behavior when external symlinks are intentional. Custom FS.FS implementations are unaffected. #2490

Security fixes and hardening

  • Default static-file operations stay within their configured roots. File reads and compressed-cache operations use os.Root to prevent symlink traversal outside Root and CompressRoot. Each root is confined independently; empty roots with AllowEmptyRoot and whole-volume roots retain their existing behavior. #2490
  • Custom filesystems no longer trigger unrelated disk deletions. A stale compressed file in a custom FS.FS previously caused an os.Remove call using its filesystem-relative name, potentially deleting a matching file in the process working directory. Custom filesystems now regenerate stale compressed content in memory without removing a disk file. #2489
  • Kept hijacked connections no longer depend on a recycled request context. With both KeepHijackedConns and ReduceMemoryUsage enabled, the hijacked reader is detached from the context before the hijack handler runs. This prevents later reads from panicking or accessing another client's connection after context reuse. #2495

Features and resource management

  • An opt-in stream reader bounds copied payload buffering. NewBoundedStreamReader works with SetBodyStream and applies backpressure when consumers fall behind. Active copied payload is limited to 160 KiB per bridge, or 320 KiB across the two bridges used by its bounded compression path. These limits exclude caller buffers, codecs, sockets, and other overhead; wrapping the reader loses the combined compression bound. Existing NewStreamReader and SetBodyStreamWriter behavior is unchanged. #2488
  • Request and response body buffers can be retained explicitly. The exported Request.KeepBodyBuffer and Response.KeepBodyBuffer fields preserve body buffers across resets for reuse. Releasing a request or response to the pool clears the retention setting. #2451
  • Adapted handlers can configure connection deadlines. RequestCtx.SetReadDeadline and SetWriteDeadline are also exposed through fasthttpadaptor, enabling http.ResponseController deadline calls. The adaptor still buffers the request body before invoking the handler, so a read deadline set inside an adapted handler cannot govern the preceding upload. #2452

HTTP compatibility and connection handling

  • Weighted compression codings are recognized. Accept-Encoding entries such as gzip;q=0.8 now match, while q=0 makes a coding unacceptable. Matching remains case-insensitive and requires a complete coding token; quality-based preference ordering and wildcard matching are not added. #2491
  • HTTP/1.0 clients no longer receive unsupported informational responses. Expect: 100-continue is ignored for HTTP/1.0 requests, and 103 Early Hints is not sent to HTTP/1.0 clients. #2492, #2496
  • Hijacking works with server keep-alive limits. DisableKeepalive and reaching MaxRequestsPerConn no longer suppress a registered hijack handler or add an unwanted Connection: close to an upgrade response. Explicit connection-close requests and other existing close conditions still apply. #2494
  • Pipe connection deadlines interrupt pending operations. Updating deadlines on fasthttputil.PipeConns now affects blocked reads and writes, and write-deadline updates no longer race with writes. #2471
  • Cookie parsing tolerates invalid attributes and handles names consistently. Invalid Max-Age attributes are ignored, Secure, HttpOnly, and Partitioned are recognized even with a value, and surrounding tabs are trimmed. Set-Cookie values without = are stored under the same empty key returned by Cookie.ParseBytes, keeping lookup and deletion consistent. #2497, #2498, #2500, #2501

Proxy authentication now uses decoded credentials in Proxy-Authorization, and static-file 416 Range Not Satisfiable responses include Content-Range. #2499, #2502

What's Changed

Security and hardening

Features

Fixes

... (truncated)

Commits
  • 61bdcc3 fix(fs): send Content-Range with 416 responses (#2502)
  • 020e4ed fix(cookie): store Set-Cookie without '=' under the key ParseBytes gives it (...
  • 33b5261 fix(cookie): trim tabs around cookie names, values and attributes (#2500)
  • 7e7f8ec fix(cookie): recognize Secure, HttpOnly and Partitioned with a value (#2498)
  • 720d20e fix(fasthttpproxy): send decoded proxy credentials in Proxy-Authorization (#2...
  • 91b4512 fix(cookie): ignore an invalid Max-Age attribute instead of failing to parse ...
  • e0f6199 Export KeepBodyBuffer on Request and Response (#2451)
  • d9bf5c5 fix: detach kept hijacked connections from the request context's reader (#2495)
  • ad21d1b make PipeConns deadlines interrupt pending reads and writes (#2471)
  • 09cba73 fix: run hijack handlers under DisableKeepalive and MaxRequestsPerConn (#2494)
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/MHSanaei/3x-ui/pull/7015 **Author:** [@dependabot[bot]](https://github.com/apps/dependabot) **Created:** 10/29/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `dependabot/go_modules/github.com/valyala/fasthttp-1.77.0` --- ### 📝 Commits (1) - [`c1b2b22`](https://github.com/MHSanaei/3x-ui/commit/c1b2b22711ece42897179c8e3e485a137e7766de) chore(deps): bump github.com/valyala/fasthttp from 1.76.0 to 1.77.0 ### 📊 Changes **2 files changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `go.mod` (+1 -1) 📝 `go.sum` (+2 -2) </details> ### 📄 Description Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.76.0 to 1.77.0. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/valyala/fasthttp/releases">github.com/valyala/fasthttp's releases</a>.</em></p> <blockquote> <h2>v1.77.0</h2> <p><code>v1.77.0</code> strengthens static-file confinement, fixes hijacked connection handling, and improves HTTP and cookie compatibility. It also adds an opt-in bounded stream reader, configurable body-buffer retention, and deadline support for adapted <code>net/http</code> handlers.</p> <p><strong>Static-file symlink behavior changes by default.</strong> The default OS-backed <code>FS</code> now rejects symlinks that leave <code>Root</code> or <code>CompressRoot</code>, as well as absolute symlinks even when their targets are inside the root. Relative symlinks that stay inside the root continue to work. Set <code>FS.AllowSymlinksOutsideRoot</code> to restore the previous behavior when external symlinks are intentional. Custom <code>FS.FS</code> implementations are unaffected. <a href="https://redirect.github.com/valyala/fasthttp/pull/2490">#2490</a></p> <h2>Security fixes and hardening</h2> <ul> <li><strong>Default static-file operations stay within their configured roots.</strong> File reads and compressed-cache operations use <code>os.Root</code> to prevent symlink traversal outside <code>Root</code> and <code>CompressRoot</code>. Each root is confined independently; empty roots with <code>AllowEmptyRoot</code> and whole-volume roots retain their existing behavior. <a href="https://redirect.github.com/valyala/fasthttp/pull/2490">#2490</a></li> <li><strong>Custom filesystems no longer trigger unrelated disk deletions.</strong> A stale compressed file in a custom <code>FS.FS</code> previously caused an <code>os.Remove</code> call using its filesystem-relative name, potentially deleting a matching file in the process working directory. Custom filesystems now regenerate stale compressed content in memory without removing a disk file. <a href="https://redirect.github.com/valyala/fasthttp/pull/2489">#2489</a></li> <li><strong>Kept hijacked connections no longer depend on a recycled request context.</strong> With both <code>KeepHijackedConns</code> and <code>ReduceMemoryUsage</code> enabled, the hijacked reader is detached from the context before the hijack handler runs. This prevents later reads from panicking or accessing another client's connection after context reuse. <a href="https://redirect.github.com/valyala/fasthttp/pull/2495">#2495</a></li> </ul> <h2>Features and resource management</h2> <ul> <li><strong>An opt-in stream reader bounds copied payload buffering.</strong> <code>NewBoundedStreamReader</code> works with <code>SetBodyStream</code> and applies backpressure when consumers fall behind. Active copied payload is limited to 160 KiB per bridge, or 320 KiB across the two bridges used by its bounded compression path. These limits exclude caller buffers, codecs, sockets, and other overhead; wrapping the reader loses the combined compression bound. Existing <code>NewStreamReader</code> and <code>SetBodyStreamWriter</code> behavior is unchanged. <a href="https://redirect.github.com/valyala/fasthttp/pull/2488">#2488</a></li> <li><strong>Request and response body buffers can be retained explicitly.</strong> The exported <code>Request.KeepBodyBuffer</code> and <code>Response.KeepBodyBuffer</code> fields preserve body buffers across resets for reuse. Releasing a request or response to the pool clears the retention setting. <a href="https://redirect.github.com/valyala/fasthttp/pull/2451">#2451</a></li> <li><strong>Adapted handlers can configure connection deadlines.</strong> <code>RequestCtx.SetReadDeadline</code> and <code>SetWriteDeadline</code> are also exposed through <code>fasthttpadaptor</code>, enabling <code>http.ResponseController</code> deadline calls. The adaptor still buffers the request body before invoking the handler, so a read deadline set inside an adapted handler cannot govern the preceding upload. <a href="https://redirect.github.com/valyala/fasthttp/pull/2452">#2452</a></li> </ul> <h2>HTTP compatibility and connection handling</h2> <ul> <li><strong>Weighted compression codings are recognized.</strong> <code>Accept-Encoding</code> entries such as <code>gzip;q=0.8</code> now match, while <code>q=0</code> makes a coding unacceptable. Matching remains case-insensitive and requires a complete coding token; quality-based preference ordering and wildcard matching are not added. <a href="https://redirect.github.com/valyala/fasthttp/pull/2491">#2491</a></li> <li><strong>HTTP/1.0 clients no longer receive unsupported informational responses.</strong> <code>Expect: 100-continue</code> is ignored for HTTP/1.0 requests, and <code>103 Early Hints</code> is not sent to HTTP/1.0 clients. <a href="https://redirect.github.com/valyala/fasthttp/pull/2492">#2492</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2496">#2496</a></li> <li><strong>Hijacking works with server keep-alive limits.</strong> <code>DisableKeepalive</code> and reaching <code>MaxRequestsPerConn</code> no longer suppress a registered hijack handler or add an unwanted <code>Connection: close</code> to an upgrade response. Explicit connection-close requests and other existing close conditions still apply. <a href="https://redirect.github.com/valyala/fasthttp/pull/2494">#2494</a></li> <li><strong>Pipe connection deadlines interrupt pending operations.</strong> Updating deadlines on <code>fasthttputil.PipeConns</code> now affects blocked reads and writes, and write-deadline updates no longer race with writes. <a href="https://redirect.github.com/valyala/fasthttp/pull/2471">#2471</a></li> <li><strong>Cookie parsing tolerates invalid attributes and handles names consistently.</strong> Invalid <code>Max-Age</code> attributes are ignored, <code>Secure</code>, <code>HttpOnly</code>, and <code>Partitioned</code> are recognized even with a value, and surrounding tabs are trimmed. <code>Set-Cookie</code> values without <code>=</code> are stored under the same empty key returned by <code>Cookie.ParseBytes</code>, keeping lookup and deletion consistent. <a href="https://redirect.github.com/valyala/fasthttp/pull/2497">#2497</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2498">#2498</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2500">#2500</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2501">#2501</a></li> </ul> <p>Proxy authentication now uses decoded credentials in <code>Proxy-Authorization</code>, and static-file <code>416 Range Not Satisfiable</code> responses include <code>Content-Range</code>. <a href="https://redirect.github.com/valyala/fasthttp/pull/2499">#2499</a>, <a href="https://redirect.github.com/valyala/fasthttp/pull/2502">#2502</a></p> <h2>What's Changed</h2> <h3>Security and hardening</h3> <ul> <li>fix(fs): resolve default FS paths with os.Root so they stay inside Root by <a href="https://github.com/Thanatos9404"><code>@​Thanatos9404</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2490">valyala/fasthttp#2490</a></li> <li>fix(fs): don't remove stale compressed files of a custom FS.FS from disk by <a href="https://github.com/Thanatos9404"><code>@​Thanatos9404</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2489">valyala/fasthttp#2489</a></li> <li>fix: detach kept hijacked connections from the request context's reader by <a href="https://github.com/h2zi"><code>@​h2zi</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2495">valyala/fasthttp#2495</a></li> </ul> <h3>Features</h3> <ul> <li>Add an opt-in bounded stream reader by <a href="https://github.com/CSXizhang"><code>@​CSXizhang</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2488">valyala/fasthttp#2488</a></li> <li>Export KeepBodyBuffer on Request and Response by <a href="https://github.com/AdamMagued"><code>@​AdamMagued</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2451">valyala/fasthttp#2451</a></li> <li>fasthttpadaptor: add support for ResponseController SetReadDeadline and SetWriteDeadline by <a href="https://github.com/AdamMagued"><code>@​AdamMagued</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2452">valyala/fasthttp#2452</a></li> </ul> <h3>Fixes</h3> <ul> <li>fix: accept Accept-Encoding codings that carry a quality value by <a href="https://github.com/ybai08"><code>@​ybai08</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2491">valyala/fasthttp#2491</a></li> <li>fix: ignore Expect: 100-continue in HTTP/1.0 requests by <a href="https://github.com/LuisFigueroaG"><code>@​LuisFigueroaG</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2492">valyala/fasthttp#2492</a></li> <li>fix: don't send 103 Early Hints to HTTP/1.0 clients by <a href="https://github.com/LuisFigueroaG"><code>@​LuisFigueroaG</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2496">valyala/fasthttp#2496</a></li> <li>fix: run hijack handlers under DisableKeepalive and MaxRequestsPerConn by <a href="https://github.com/h2zi"><code>@​h2zi</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2494">valyala/fasthttp#2494</a></li> <li>make PipeConns deadlines interrupt pending reads and writes by <a href="https://github.com/h2zi"><code>@​h2zi</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2471">valyala/fasthttp#2471</a></li> <li>fix(cookie): ignore an invalid Max-Age attribute instead of failing to parse by <a href="https://github.com/nk-batman21"><code>@​nk-batman21</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2497">valyala/fasthttp#2497</a></li> <li>fix(fasthttpproxy): send decoded proxy credentials in Proxy-Authorization by <a href="https://github.com/nk-batman21"><code>@​nk-batman21</code></a> in <a href="https://redirect.github.com/valyala/fasthttp/pull/2499">valyala/fasthttp#2499</a></li> </ul> <!-- raw HTML omitted --> </blockquote> <p>... (truncated)</p> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/valyala/fasthttp/commit/61bdcc30d0484032c9b2af7c16f6ec0f2089d288"><code>61bdcc3</code></a> fix(fs): send Content-Range with 416 responses (<a href="https://redirect.github.com/valyala/fasthttp/issues/2502">#2502</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/020e4edeca1d382212f86cf0800e99d1633d2a58"><code>020e4ed</code></a> fix(cookie): store Set-Cookie without '=' under the key ParseBytes gives it (...</li> <li><a href="https://github.com/valyala/fasthttp/commit/33b52614296f7c01815719af680a42d285a7b909"><code>33b5261</code></a> fix(cookie): trim tabs around cookie names, values and attributes (<a href="https://redirect.github.com/valyala/fasthttp/issues/2500">#2500</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/7e7f8ecd9a8327705ab1e6a1af94840e842799d9"><code>7e7f8ec</code></a> fix(cookie): recognize Secure, HttpOnly and Partitioned with a value (<a href="https://redirect.github.com/valyala/fasthttp/issues/2498">#2498</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/720d20ee202dc5d186aa61e1dbd86ec66eb6a9f9"><code>720d20e</code></a> fix(fasthttpproxy): send decoded proxy credentials in Proxy-Authorization (<a href="https://redirect.github.com/valyala/fasthttp/issues/2">#2</a>...</li> <li><a href="https://github.com/valyala/fasthttp/commit/91b4512285e82d471114e81accb30b6ab72c2070"><code>91b4512</code></a> fix(cookie): ignore an invalid Max-Age attribute instead of failing to parse ...</li> <li><a href="https://github.com/valyala/fasthttp/commit/e0f6199f8bafde56a81c749fb61c9c20b9f88273"><code>e0f6199</code></a> Export KeepBodyBuffer on Request and Response (<a href="https://redirect.github.com/valyala/fasthttp/issues/2451">#2451</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/d9bf5c578fe589ab99a4ef0616f2aedf9f521c55"><code>d9bf5c5</code></a> fix: detach kept hijacked connections from the request context's reader (<a href="https://redirect.github.com/valyala/fasthttp/issues/2495">#2495</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/ad21d1b514ee267e6d78002468d73aa7521507c5"><code>ad21d1b</code></a> make PipeConns deadlines interrupt pending reads and writes (<a href="https://redirect.github.com/valyala/fasthttp/issues/2471">#2471</a>)</li> <li><a href="https://github.com/valyala/fasthttp/commit/09cba73448090a724fe9eda660c7eb7c2d8740ce"><code>09cba73</code></a> fix: run hijack handlers under DisableKeepalive and MaxRequestsPerConn (<a href="https://redirect.github.com/valyala/fasthttp/issues/2494">#2494</a>)</li> <li>Additional commits viewable in <a href="https://github.com/valyala/fasthttp/compare/v1.76.0...v1.77.0">compare view</a></li> </ul> </details> <br /> [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/valyala/fasthttp&package-manager=go_modules&previous-version=1.76.0&new-version=1.77.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:09:48 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#6577
No description provided.