mirror of
https://github.com/J3vb/OwnCord.git
synced 2026-09-03 03:50:00 +03:00
- I-1: Add key holder election in Hub (lowest userID per channel); reject non-key-holder voice_e2ee_offer with NOT_KEY_HOLDER error - I-2: Accept raw (unpadded) base64 in E2EE announce/offer handlers via decodeBase64Loose fallback - I-6: Copy E2EE public key value while h.mu.RLock is held in getClientE2EEPubKey - I-7: Lower loginRateLimitPerMinute from 60 to 5 - C-1: TOCTOU fix — target channel check held under same lock as client lookup - C-2: Include is_key_holder bool in voice_token payload so client knows whether to initiate key distribution - M-5/M-6: Add ErrCodeBadPayload/ErrCodeNotKeyHolder error constants - Fix pre-existing api build errors: block_handler.go getUserFromContext, router.go RequirePermission arg count - Add user_blocks table to all test DB schemas (ws, api DM) - Add voice_e2ee_test.go and constants_test.go covering all fixes
11 lines
245 B
Go
11 lines
245 B
Go
package api
|
|
|
|
import "testing"
|
|
|
|
// I-7: loginRateLimitPerMinute must be 5 (not 60).
|
|
func TestLoginRateLimit_Value(t *testing.T) {
|
|
if loginRateLimitPerMinute != 5 {
|
|
t.Errorf("loginRateLimitPerMinute = %d, want 5", loginRateLimitPerMinute)
|
|
}
|
|
}
|