fix: update uid encryption key fallback

This commit is contained in:
richjohnrambo
2026-09-17 16:59:47 +08:00
parent ba6fd7f1b6
commit f027764c47
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -19,7 +19,7 @@
"auth": {
"api_keys": [],
"session_key_pattern": "im:session:token:%s",
"uid_key": "la6YsO+bNX/+XIkOqc5Svw==",
"uid_key": "dkXxWLwqUNRfYmdXRzOkZw==",
"allow_dev_header_auth": true,
"required_tenant_code": true,
"required_api_key": false,
+1 -1
View File
@@ -23,7 +23,7 @@
"auth": {
"api_keys": [],
"session_key_pattern": "im:session:token:%s",
"uid_key": "la6YsO+bNX/+XIkOqc5Svw==",
"uid_key": "dkXxWLwqUNRfYmdXRzOkZw==",
"allow_dev_header_auth": false,
"required_tenant_code": true,
"required_api_key": true,
+1 -1
View File
@@ -100,7 +100,7 @@ func defaultConfig() *Config {
},
Auth: AuthConfig{
SessionKeyPattern: "im:session:token:%s",
UIDKey: "la6YsO+bNX/+XIkOqc5Svw==",
UIDKey: "dkXxWLwqUNRfYmdXRzOkZw==",
RequiredTenantCode: true,
RequiredAPIKey: true,
},
+1 -1
View File
@@ -14,7 +14,7 @@ import (
type userID int64
const defaultUIDKey = "la6YsO+bNX/+XIkOqc5Svw=="
const defaultUIDKey = "dkXxWLwqUNRfYmdXRzOkZw=="
var (
uidCodecMu sync.RWMutex
+1 -1
View File
@@ -24,7 +24,7 @@ func TestUserIDJSONAcceptsIMUserID(t *testing.T) {
func TestUserIDCodecMatchesIMServer(t *testing.T) {
const (
publicID = "usrOj2NWDNdlMU"
publicID = "usr3rZjh8TD_34"
dbID = int64(1574592702383656960)
)
got, err := parseUserID(publicID)