574 Commits

Author SHA1 Message Date
Matthew Penner
13029244e3 feat: add mount for /etc/machine-id for servers
Signed-off-by: Matthew Penner <me@matthewp.io>
2026-01-13 11:49:43 -07:00
Dane Everitt
e023eb6b3c Apply throttling to websocket connections, websocket messages, and individual events (#290) 2026-01-05 16:07:39 -08:00
Dane Everitt
e1e88d5a84 Correctly block reconnection to a websocket when revoking authorization (#289)
The previously comitted logic did correctly disconnect the user from the websocket, but missed blocking re-connecting with the same token. This updated logic correctly tracks the time of revocation and prevents any JWT issued to that user for that server before the revocation time from being re-used.

This was simpler than having to update the Panel to send along a bunch of JTIs and feels less error prone. I want to clean this up a lot, but it'll be a breaking change so we'll do it as a 2.0 release when we can safely do all of that.
2025-12-30 06:42:57 -08:00
Dane Everitt
a97e8ae09f Security: disconnect active SFTP connections when server suspended or user removed (#288) 2025-12-26 17:50:56 -08:00
Dane Everitt
baa88407c3 Close all open websocket connections when server is suspended (#287) 2025-12-26 09:52:10 -08:00
Matthew Penner
1dee350268 server(filesystem): fix archive filesystem
Signed-off-by: Matthew Penner <me@matthewp.io>
2025-01-12 14:22:18 -07:00
Daniel Barton
ec14db6142 fix: backups unable to be restored 2024-12-21 18:48:14 -07:00
Matthew Penner
b4dc19fca1 Revert "fix: remove unnecessary seek call and wrap errors with additional information"
This reverts commit a2be26574c.

I thought this was unnecessary but only if we use the reader returned by
`archives.Identify`, since we use the original file we still need this.
2024-12-09 10:58:26 -07:00
Matthew Penner
a2be26574c fix: remove unnecessary seek call and wrap errors with additional information
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-12-07 19:06:48 -07:00
Matthew Penner
8045318e44 go: update dependencies
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-12-07 14:54:17 -07:00
Matthew Penner
024fe548ed chore: switch from mholt/archiver/v4 to mholt/archives
Fixes https://github.com/pterodactyl/panel/issues/5253

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-12-07 14:46:59 -07:00
Matthew Penner
adb2b26ae0 go: update dependencies (#198)
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-08-28 19:47:33 -06:00
Daniel Barton
6c9d3670c8 fix: symlinks not flagged correctly in file stat (#199) 2024-08-28 19:47:12 -06:00
Matthew Penner
d739948989 feat: add ability to mount generated passwd files to containers (#197)
This PR will add an option to mount:
- `/etc/group`
- `/etc/passwd`

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-07-24 15:12:42 -06:00
EpicPlayerA10
1d8b383682 fix: only count hard-links once when calculating filesystem usage (#181) 2024-06-29 12:56:51 -06:00
Daniel Barton
29e4425e21 fix: overhaul docker container termination signals (#192)
Fixes https://github.com/pterodactyl/panel/issues/4783

Requires https://github.com/pterodactyl/panel/pull/5132 to work
2024-06-29 12:31:36 -06:00
Daniel Barton
ad1ae862a9 fix: user-defined labels not being passed to environment (#191) 2024-06-29 12:25:47 -06:00
Daniel Barton
9b341db2db server(filesystem): fix sort position of directories (#188) 2024-05-13 15:52:10 -06:00
Geri
06614de99d server(filesystem): handle individual compressed files (#184) 2024-05-07 22:06:15 -06:00
Matthew Penner
f1c5bbd42d server(filesystem): allow decompressing individual files
Implements logic for handling a file that is compressed but isn't an archive.

Fixes https://github.com/pterodactyl/panel/issues/5034

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-17 14:58:30 -06:00
Matthew Penner
1c5ddcd20c server(filesystem): handle writing empty files
Fixes https://github.com/pterodactyl/panel/issues/5038

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-17 14:58:13 -06:00
Matthew Penner
ac9bd1d95e server(filesystem): fix archives in subdirectories
When creating an archive starting from a subdirectory instead of the
root of a server's filesystem, the walker would treat the paths as if
they where relative to the parent of the subdirectory, instead of as
descendants of the subdirectory.

Fixes https://github.com/pterodactyl/panel/issues/5030
2024-03-14 13:46:36 -06:00
Matthew Penner
979df34392 server(filesystem): fix archive creation with ignore
Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-13 20:29:09 -06:00
Matthew Penner
2931430eb8 server(filesystem): fix archive skipping directories
Fixes https://github.com/pterodactyl/panel/issues/5027

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-13 15:09:24 -06:00
Matthew Penner
d1c0ca5260 server(filesystem): rebuild everything imaginable
This wonderfully large commit replaces basically everything under the
`server/filesystem` package, re-implementing essentially everything.

This is related to
https://github.com/pterodactyl/wings/security/advisories/GHSA-494h-9924-xww9

If any vulnerabilities related to symlinks persist after this commit, I
will be very upset.

Signed-off-by: Matthew Penner <me@matthewp.io>
2024-03-13 12:27:29 -06:00
Daniel Barton
d1fd0465e4 server(filesystem): fix file names when extracting archives (#165) 2023-10-17 20:47:36 -06:00
guangwu
48c55af373 chore: slice loop replace (#173) 2023-10-02 17:24:17 -06:00
guangwu
7a59d0929c chore: remove unnecessary use of fmt.Sprintf (#174) 2023-10-02 17:23:45 -06:00
Matthew Penner
4d51de71c2 server(filesystem): fix test failure 2023-05-10 12:59:22 -06:00
Matthew Penner
b665c943a2 server(install): remove privileges from install container 2023-05-10 12:35:46 -06:00
Matthew Penner
a50e4ce9d1 go: update dependencies 2023-05-08 13:52:15 -06:00
Matthew Penner
74b1c46b7f server(filesystem): fix archive test 2023-03-07 15:29:29 -07:00
Matthew Penner
43b3496f00 server(filesystem): fix archiver path matching
Closes https://github.com/pterodactyl/panel/issues/4630
2023-03-07 15:19:09 -07:00
Matthew Penner
429ac62dba server(filesystem): Delete tweaks 2023-02-08 14:20:13 -07:00
Matthew Penner
dac9685298 server(filesystem): SafePath tweaks 2023-02-07 19:14:35 -07:00
Matthew Penner
14eea3b1e4 router: close body once finished 2023-01-24 12:33:42 -07:00
Matthew Penner
13d3490bcf server(filesystem): fix Writefile being broken 2023-01-17 18:44:56 -07:00
Matthew Penner
e9b8b11fec Ensure files are closed after they are done being used 2023-01-17 18:34:08 -07:00
Matthew Penner
9b8b3c90fb environment(docker): improve logging and stacks 2023-01-17 11:47:27 -07:00
Matthew Penner
43227bf24d server(transfer): fix dead-lock while uploading archive
Previously we waited for both the request and multipart writer
to "complete", before handing any errors.  This lead to a problem
where if the request returns before all the data has been read,
the upload would become stuck and keep the server in a transferring
state when the transfer should've been aborted.

Closes https://github.com/pterodactyl/panel/issues/4578
2022-11-29 14:04:27 -07:00
Dane Everitt
ff50d0e5bd Cleanup request error handling; properly handle os.ErrNotExist errors (#150) 2022-11-22 11:18:27 -07:00
Matthew Penner
da94f750ad server(install): update installation status request
The new request includes a `reinstall` option to denote
whether the installation failed for the first time, or
during a reinstall.

ref https://github.com/pterodactyl/panel/issues/1994
2022-11-21 14:57:44 -07:00
Matthew Penner
57e7eb714c Streaming Transfers (#153) 2022-11-14 18:25:01 -07:00
Matthew Penner
eb4df39d14 server(filesystem): fix inaccurate archive progress (#145) 2022-11-06 13:38:30 -07:00
Matthew Penner
3337362955 environment(docker): fix podman compatibility (#151) 2022-11-06 13:33:01 -07:00
Matthew Penner
f577f5521f server(filesystem): fix panic with archive Progress 2022-11-04 11:24:19 -06:00
Cubxity
5a760a0dcc Add customizable container labels (#146) 2022-10-16 17:17:27 -06:00
Matthew Penner
058f643e65 chore: reformat code 2022-10-06 09:58:42 -06:00
Matthew Penner
3f481e9540 chore: run gofumpt 2022-10-05 17:24:11 -06:00
Matthew Penner
6fb61261b0 server(transfers): track progress of archive creation and extraction (#143) 2022-10-04 20:35:48 -06:00