Skip to content

Commit f756fc7

Browse files
committed
fix
1 parent 0922ce8 commit f756fc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

routers/api/packages/generic/generic.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import (
1818
)
1919

2020
var (
21-
packageNameRegex = regexp.MustCompile(`\A[A-Za-z0-9\.\_\-\+]+\z`)
22-
filenameRegex = packageNameRegex
21+
packageNameRegex = regexp.MustCompile(`\A[-_+.A-Za-z0-9]+\z`)
22+
filenameRegex = regexp.MustCompile(`\A[-_+=:;.()\[\]{}~!@#$%^& A-Za-z0-9]+\z`)
2323
)
2424

2525
func apiError(ctx *context.Context, status int, obj any) {

0 commit comments

Comments
 (0)