Skip to content

Upgrade to upstream v1.13.4 - #12

Merged
HerrSammyDE merged 31 commits into
developfrom
upgrade-1.13.4
Oct 14, 2026
Merged

HerrSammyDE merged 31 commits into
developfrom
upgrade-1.13.4

Conversation

@HerrSammyDE

Copy link
Copy Markdown
Member

Brings the fork up to upstream pterodactyl/wings v1.13.4 (747bc43).

⚠️ Merging this PR cuts v1.13.4 automatically. The release pipeline detects the new upstream version on develop, builds the binaries and the image, and publishes once everything checks out.

Upstream v1.13.4

This is a broad hardening release: 153 files and ~60 new test suites, including advisory GHSA-8m75-v66f-m43j.

  • Filesystem and archives: symlink/hard-link containment, validated and size/time-limited ignore lists (ignore.go), rewritten decompression (archiverext/ removed), quota accounting that no longer follows links.
  • Network: new internal/network. The remote-download dialer is SSRF-checked, with the new api.remote_download_allowlist. Backup-restore downloads use the same checks.
  • SFTP: handshake timeout, per-user connection cap (max_connections_per_user, default 32), and a cap on authenticating connections per IP (max_authenticating_connections_per_ip, default 16).
  • WebSocket/API: serialized writes with deadlines, throttled sends, an atomic transfer claim (StartTransferring()).
  • Config: a Panel config update can only change the Panel-owned fields (PanelConfiguration).
  • Restore: a truncate flag inside the restore, no more suspend/unsuspend, symlinks are recreated.
  • Tooling: Go 1.26, golangci-lint CI (lint.yaml, .golangci.yml).

Merge

24 conflicted files. They were resolved the v1.13.1 way: our backup subsystem is kept as the base and upstream's changes are grafted on top.

  • server/backup.go / router_server_backup.go:
    • Upstream's truncate now runs inside RestoreBackupWithContext, after stop and after compression detection.
    • Suspension toggling is dropped; SetRestoring(true) is set before WaitForStop.
    • restoreEntry combines our directory mode/chown/chtimes with upstream's handling of symlinks and special files.
    • The SSRF checks now go through internal/network.
  • server/backup/backup_s3.go: upstream's unconditional defer s.Remove() was not taken, because we keep failed uploads for retry.
  • router/downloader/downloader.go: our redirect loop and sanitizeFilename sit on top of upstream's dialer. Upstream's error wrapping and its Content-Disposition reduction are grafted in.
  • archive.go: empty-directory preservation and createCompressor() are kept, plus upstream's ignore compilation and link handling. Upstream's archive_test.go additions were ported into archive_stream_test.go.
  • router_server_transfer.go: our backup/restore 409 guards run before StartTransferring().
  • CI: our release pipeline is kept. binary.yaml builds with Go 1.27.2 / setup-go v7. Also bumped: docker/login-action v4 and docker/build-push-action v7 (major version; watch the digest and the cache on the next release run).

Also in this PR:

  • gofmt after the module rename (it changes import order), and all golangci-lint findings in fork code fixed, so the new Lint workflow passes.
  • A latent fork crash fix: the docker SetState whitelist rejected backup_queued/restore_queued. With more than 8 concurrent operations, a queued restore crashed Wings and a queued backup leaked its registry slot. Now covered by environment/docker/state_test.go.

Rollout notes

  • Panel config updates can now only set uuid, token, API host/port/SSL, upload limit, SFTP port and debug. Anything else the Panel sends is ignored.
  • If SFTP clients connect through a proxy, raise system.sftp.max_authenticating_connections_per_ip.

Docs

  • CHANGELOG.md: new ## v1.13.4 section, which becomes the release notes.
  • FORK_CHANGES.md: baseline moved to v1.13.4. It now records the new fork/upstream interlocks, the queued-state fix (§3), the v1.13.4 hardening as upstream code (§4), and a new upgrade checklist (§5).

Verification

Run in a golang:1.26 container (Linux, go1.26.9):

  • go build ./...: OK
  • go vet ./...: OK
  • go test -race -count=1 ./...: all 22 packages pass
  • golangci-lint v2.11.4 on an LF export of the index: 0 issues
  • No conflict markers left; no github.com/pterodactyl/wings imports left.

infraly-will and others added 27 commits August 14, 2026 15:24
* GHSA-8m75-v66f-m43j fix

* amend advisory to split fix ignore handling into new function and handle ignore parsing

---------

Co-authored-by: Sky Mulley <skymulley@gmail.com>
24 conflicted files, resolved the v1.13.1 way: keep the fork's backup
subsystem and graft upstream's changes on top.

- Restore: upstream's truncate flag now runs inside the restore after
  stop, no suspend toggling, symlinks recreated / special files skipped;
  fork dir mode/chown, progress and compression detection kept.
- SSRF checks moved to internal/network; downloader keeps the fork
  redirect loop and filename sanitizing on top of upstream's dialer.
- Upstream archive_test.go additions ported into archive_stream_test.go.
- Transfer guards run before upstream's atomic StartTransferring().
- CI: Go 1.27.2 / setup-go v7 in binary.yaml (go.mod requires 1.26),
  login-action v4, build-push-action v7; fork release pipeline kept.

Also in this merge, to keep the new upstream lint CI green: gofmt after
the module rename, golangci-lint findings in fork code fixed. And a
latent fork crash fixed: the docker SetState whitelist rejected the
backup_queued/restore_queued states, so queued backups/restores
panicked and leaked their registry slot.
FORK_CHANGES.md: baseline rebased onto v1.13.4 (747bc43); §1 records
where fork and upstream code now interlock (restore truncate/suspension,
downloader, transfer guards, websocket backup gate, CI bumps), §3 the
fixed queued-state crash, §4 the v1.13.4 hardening as upstream code,
and a new §5 upgrade checklist (gofmt after the rename, golangci-lint).
Comment thread cmd/root.go
log.Warn("running with --ignore-certificate-errors: TLS certificate host chains and name will not be verified")
http.DefaultTransport.(*http.Transport).TLSClientConfig = &tls.Config{
InsecureSkipVerify: true,
InsecureSkipVerify: true, //nolint:gosec // opt-in via --ignore-certificate-errors
The README install command fetched a plain 'wings' asset from
Rene-Roscher/wings, which our releases never publish. It now downloads
wings_linux_amd64/arm64 from emeraldhost/wings, and the build-from-source
line builds the module root instead of cmd/root.go. The startup banner's
Source/License links point at the repo too. The Go module path stays
github.com/Rene-Roscher/wings.
…nd ws events

- CleanupForDestroy deleted every local backup on the node (filename
  pattern match, no server filter) on server delete, duplicate create and
  transfer cleanup. Removed cleanupBackupFiles/CleanupBackupFilesForServer;
  local backups are only removed by the Panel's per-backup delete.
- Backup-op cancellation moved out of CleanupForDestroy into deleteServer
  (CancelBackupOperations), so a throwaway instance sharing the UUID no
  longer cancels the live server's backups/restores.
- Downloader: chunked bodies are capped at maxDownloadSize and written
  with WriteFrom (Write copied nothing for size -1, leaving an empty
  file); write errors now reach the final progress event.
- Restore no longer logs the presigned download URL, only its host.
- WebSocket: activity needs activity.read, download progress file.read.
- Removed unreachable validateBackupContent/validateBackupIntegrity and
  their helpers.
…he code

FORK_CHANGES.md: false/stale claims fixed (sftp/server.go is upstream,
timeouts, backoff, test-suite origins, event routing, §2 wording, §3
baseline, §4 contradictions), missing divergences added
(internal/progress, router_server_files.go activity, docs files,
changelog), §3 split into open issues and fixes made in this merge, §5
checklist corrected (GOOS=linux lint, race tests on Linux, leak grep).
README fork section, BACKUP_PROGRESS_EVENTS.md and WEBSOCKET_EVENTS.md
brought in line with the code; changelog lists the new fixes.
- Untrack the committed wings-debug/-fixed/-test and dist/wings_test
  binaries (~153 MB), gitignore /wings-* and /dist/, and mkdir dist in
  binary.yaml (it only existed because of the committed binary).
- StartTransferring() refuses while a backup is running.
- LocateLocal's .tar fallback: foundPath moves into Backup so Size,
  Checksum and Details read the found file; drop unused
  PathForLocalBackup. New test.
- S3 uploader really forces HTTP/1.1 (empty TLSNextProto) and honours
  proxy environment variables again.
- checksum_type label sha1 -> sha256 in the panel-notify-failure event.

Docs: FORK_CHANGES §3 moves these to the resolved list; the queued
backup/restore guard gap stays open. Changelog updated.
@HerrSammyDE
HerrSammyDE merged commit 2e3cd3c into develop Oct 14, 2026
6 of 7 checks passed
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.

7 participants