Skip to content

Upgrade to upstream v1.13.3 (credential rotation, SFTP hardening, CPU burst) - #10

Merged
HerrSammyDE merged 11 commits into
developfrom
upgrade-1.13.3
Aug 14, 2026
Merged

Upgrade to upstream v1.13.3 (credential rotation, SFTP hardening, CPU burst)#10
HerrSammyDE merged 11 commits into
developfrom
upgrade-1.13.3

Conversation

@HerrSammyDE

Copy link
Copy Markdown
Member

Brings the fork up to upstream pterodactyl/wings v1.13.3 (6987d5e).

⚠️ Merging this PR cuts v1.13.3 automatically — the release pipeline detects the new upstream version on develop, builds the binaries and image, and publishes once everything is verified. No tag push, no manual publish.

Upstream v1.13.3

Eight commits, three clusters:

Master-key rotation (07ce5fe, 392e52c, 3e6c2c9): a master key reset through the Panel now propagates to the running daemon — previously Wings kept authenticating with the boot-time token until restarted. postUpdateConfiguration re-resolves the derived token and rotates the (now mutex-guarded) Panel API client credentials via the new Client.SetCredentials(). Hardened alongside: Panel-sent token values may not use file:///$VAR indirection (which would leak files/env vars back out through the token), must match WINGS_TOKEN_ID/WINGS_TOKEN environment overrides when set, and an update carrying an empty token is refused.

SFTP hardening (da1a216): setstat requests carrying the extended-attribute flag are rejected before parsing — pkg/sftp allocates the client-provided attribute count before validating packet length, so a small packet could request an effectively unbounded allocation.

CPU allocation (2cc8a10, 6987d5e): new environment/docker/cgroup_burst.go (cgroup v1+v2, applied on start/install/in-situ updates) plus three config fields — docker.cpu_period, docker.cpu_burst.percent, docker.cpu_shares (default 0 = engine default; Wings historically hardcoded 1024).

Plus the logrotate wrapper fix (#336) and Expand() no longer silently swallowing file:// read errors.

Merge

Two conflicts, both expected:

  • .github/workflows/release.yaml — resolved keep ours (our automatic pipeline). Upstream's addition there (c57c519) only notifies pterodactyl's own CDN-manifest repo; deliberately dropped and noted in FORK_CHANGES.md.
  • server/install.go — module-renamed import block plus the new environment/docker import.

Two leaked pterodactyl/wings imports in the newly added files (cgroup_burst.go, router_system_test.go) were renamed to Rene-Roscher; the repo greps clean. The five fork-touched files (config.go, remote/http.go, router_system.go, sftp/handler.go, environment/settings.go) differ from upstream only by the module rename plus our publisher: srv wiring in the SFTP handler — activity streaming preserved, upstream hardening in.

Docs

  • CHANGELOG.md gained the ## v1.13.3 section — required by the release gate, and it becomes the release notes verbatim.
  • FORK_CHANGES.md: baseline rebased onto v1.13.3, §4 records all three upstream clusters (and their test suites) as upstream code so the next upgrade does not mistake them for fork changes.

Verification

Run in a golang:1.24 container (no Go on the dev host):

  • go build ./... — clean.
  • go test ./... -count=1 — all packages pass.
  • New upstream suites pass verbosely: token indirection/override rejection, TestSetCredentials, TestPostUpdateConfigurationRotatesCredentials, TestCpuBurstMicroseconds, TestResolveCgroupCpuFile (v1/v2/rootless), TestHandlerRejectsMalformedSetstatAttributes, TestSetstatMode.
  • go vet ./... — exactly the four pre-existing findings, nothing new.

infraly-will and others added 11 commits August 3, 2026 15:42
pterodactyl/pterodactyl-cdn publishes
https://cdn.pterodactyl.io/releases/latest.json, which every panel
install polls to decide whether a node is running an outdated wings. It
cannot read the new version from the API itself, because the release
created above is still a draft and /releases/latest excludes drafts, so
the tag is passed in the dispatch payload.

Prerelease tags are skipped: version_compare on the panel side would
tell every stable install to "upgrade" to a release candidate.

GITHUB_TOKEN cannot be used here as it has no access to another
repository, hence CDN_DISPATCH_TOKEN.
The v1.13.3 changelog section doubles as the release notes — the release
gate refuses to publish without it.

FORK_CHANGES.md: baseline rebased onto v1.13.3 (6987d5e); §4 records the
master-key-rotation cluster, the SFTP setstat hardening and the CPU
burst/period/shares work as upstream code, so the next upgrade does not
mistake them for fork changes. The dropped CDN-manifest notification is
noted on the release-pipeline row.
@HerrSammyDE
HerrSammyDE merged commit 34cd291 into develop Aug 14, 2026
6 checks passed
@HerrSammyDE
HerrSammyDE deleted the upgrade-1.13.3 branch August 14, 2026 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants