Files
Gitea/routers/api/packages/maven/maven_test.go
T
Giteabot b5c6b80790 fix(packages): limit Maven checksum uploads (#39028) (#39031)
Backport #39028 by @bircni

Bound checksum uploads to the maximum usable digest length before
buffering their content.

Co-authored-by: bircni <bircni@icloud.com>
2026-08-22 00:33:24 +00:00

16 lines
330 B
Go

// Copyright 2026 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package maven
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestChecksumSizeAllowed(t *testing.T) {
assert.True(t, isChecksumSizeAllowed(maxChecksumSize))
assert.False(t, isChecksumSizeAllowed(maxChecksumSize+1))
}