fix: incorrect alphabet size used in session-table for predefined tables in xhttp-config

This commit is contained in:
SaltyMonkey authored and wwqgtxx committed 2026-07-09 07:34:03 +08:00
1 parent 5ec37681f9
commit 02dfcf2b4d
1 file changed
+1 -1
+1 -1
View File
@@ -630,7 +630,7 @@ func (c *Config) GetGenerateSessionID() (func() string, error) {
if err != nil {
return nil, fmt.Errorf("invalid session-length: %w", err)
}
room := roomSize(len(c.SessionTable), sessionLength.Min, sessionLength.Max)
room := roomSize(len(sessionTable), sessionLength.Min, sessionLength.Max)
// 2.1B possiblities should be enough
if room.Cmp(big.NewInt(2<<30)) < 0 {
return nil, errors.New("session-table or session-length is too small")