Repository navigation
Upgrade to upstream v1.13.4 - #12
Merged
Merged
Conversation
* 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).
| 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings the fork up to upstream pterodactyl/wings v1.13.4 (
747bc43).Upstream v1.13.4
This is a broad hardening release: 153 files and ~60 new test suites, including advisory GHSA-8m75-v66f-m43j.
ignore.go), rewritten decompression (archiverext/removed), quota accounting that no longer follows links.internal/network. The remote-download dialer is SSRF-checked, with the newapi.remote_download_allowlist. Backup-restore downloads use the same checks.max_connections_per_user, default 32), and a cap on authenticating connections per IP (max_authenticating_connections_per_ip, default 16).StartTransferring()).PanelConfiguration).truncateflag inside the restore, no more suspend/unsuspend, symlinks are recreated.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:truncatenow runs insideRestoreBackupWithContext, after stop and after compression detection.SetRestoring(true)is set beforeWaitForStop.restoreEntrycombines our directory mode/chown/chtimes with upstream's handling of symlinks and special files.internal/network.server/backup/backup_s3.go: upstream's unconditionaldefer s.Remove()was not taken, because we keep failed uploads for retry.router/downloader/downloader.go: our redirect loop andsanitizeFilenamesit on top of upstream's dialer. Upstream's error wrapping and itsContent-Dispositionreduction are grafted in.archive.go: empty-directory preservation andcreateCompressor()are kept, plus upstream's ignore compilation and link handling. Upstream'sarchive_test.goadditions were ported intoarchive_stream_test.go.router_server_transfer.go: our backup/restore 409 guards run beforeStartTransferring().binary.yamlbuilds with Go 1.27.2 /setup-gov7. Also bumped:docker/login-actionv4 anddocker/build-push-actionv7 (major version; watch the digest and the cache on the next release run).Also in this PR:
gofmtafter the module rename (it changes import order), and all golangci-lint findings in fork code fixed, so the new Lint workflow passes.SetStatewhitelist rejectedbackup_queued/restore_queued. With more than 8 concurrent operations, a queued restore crashed Wings and a queued backup leaked its registry slot. Now covered byenvironment/docker/state_test.go.Rollout notes
system.sftp.max_authenticating_connections_per_ip.Docs
CHANGELOG.md: new## v1.13.4section, which becomes the release notes.FORK_CHANGES.md: baseline moved tov1.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.26container (Linux, go1.26.9):go build ./...: OKgo vet ./...: OKgo test -race -count=1 ./...: all 22 packages passgolangci-lintv2.11.4 on an LF export of the index: 0 issuesgithub.com/pterodactyl/wingsimports left.