Compare commits

..

4 Commits

Author SHA1 Message Date
Pterodactyl CI
c2f246df41 bump version for release 2023-01-31 01:38:49 +00:00
Matthew Penner
774c0af0b0 Update CHANGELOG.md 2023-01-30 18:33:30 -07:00
Alexander Trost
71fbd9271e activity: fix ip validity check (#159) 2023-01-30 09:09:36 -07:00
Matthew Penner
2d640209e5 backup: fix restore erroring due to closed reader 2023-01-29 17:06:49 -07:00
4 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,10 @@
# Changelog # Changelog
## v1.11.2
### Fixed
* Backups being restored from remote storage (s3) erroring out due to a closed stream.
* Fix IP validation logic for activity logs filtering out valid IPs instead of invalid IPs
## v1.11.1 ## v1.11.1
### Changed ### Changed
* Release binaries are now built with Go 1.18.10 * Release binaries are now built with Go 1.18.10

View File

@@ -49,7 +49,7 @@ func (ac *activityCron) Run(ctx context.Context) error {
for _, v := range activity { for _, v := range activity {
// Delete any activity that has an invalid IP address. This is a fix for // Delete any activity that has an invalid IP address. This is a fix for
// a bug that truncated the last octet of an IPv6 address in the database. // a bug that truncated the last octet of an IPv6 address in the database.
if err := net.ParseIP(v.IP); err != nil { if ip := net.ParseIP(v.IP); ip == nil {
ids = append(ids, v.ID) ids = append(ids, v.ID)
continue continue
} }

View File

@@ -147,7 +147,6 @@ func postServerRestoreBackup(c *gin.Context) {
middleware.CaptureAndAbort(c, err) middleware.CaptureAndAbort(c, err)
return return
} }
defer res.Body.Close()
// Don't allow content types that we know are going to give us problems. // Don't allow content types that we know are going to give us problems.
if res.Header.Get("Content-Type") == "" || !strings.Contains("application/x-gzip application/gzip", res.Header.Get("Content-Type")) { if res.Header.Get("Content-Type") == "" || !strings.Contains("application/x-gzip application/gzip", res.Header.Get("Content-Type")) {
_ = res.Body.Close() _ = res.Body.Close()

View File

@@ -1,3 +1,3 @@
package system package system
var Version = "1.11.1" var Version = "1.11.2"