did some fixes
This commit is contained in:
@@ -25,11 +25,11 @@ app.config['SECRET_KEY'] = os.environ.get('SECRET_KEY', 'dev-secret-key-change-i
|
||||
socketio = SocketIO(app, cors_allowed_origins="*", async_mode='eventlet')
|
||||
|
||||
# Security constants
|
||||
MAX_MESSAGES = 256
|
||||
MAX_MESSAGES = 512
|
||||
MAX_ROOM_ID_LENGTH = 32
|
||||
MAX_MESSAGE_SIZE = 8192 # 8KB max encrypted message
|
||||
MAX_ROOMS_PER_IP = 5
|
||||
MAX_USERS_PER_ROOM = 50
|
||||
MAX_ROOMS_PER_IP = 100
|
||||
MAX_USERS_PER_ROOM = 1000
|
||||
ROOM_CLEANUP_INTERVAL = 3600 # 1 hour
|
||||
USER_SESSION_TIMEOUT = 3600 # 1 hour
|
||||
|
||||
|
||||
@@ -17,11 +17,11 @@ let lastMessageTime = 0;
|
||||
let messageQueue = [];
|
||||
let isConnected = false;
|
||||
let reconnectAttempts = 0;
|
||||
const MAX_RECONNECT_ATTEMPTS = 5;
|
||||
const MAX_RECONNECT_ATTEMPTS = 10;
|
||||
const MESSAGE_RATE_LIMIT = 1000;
|
||||
const MAX_MESSAGE_LENGTH = 4000;
|
||||
const MAX_ROOM_ID_LENGTH = 32;
|
||||
const MAX_MESSAGES = 256;
|
||||
const MAX_MESSAGES = 512;
|
||||
|
||||
// Security utilities
|
||||
const SecurityUtils = {
|
||||
|
||||
@@ -17,7 +17,9 @@
|
||||
<div class="chat-header">
|
||||
<div class="header-content">
|
||||
<div class="logo">
|
||||
<a href="/" style="text-decoration: none; font-weight: inherit; font-style: inherit; color: inherit;">
|
||||
ByteChat
|
||||
</a>
|
||||
</div>
|
||||
<div class="encryption-badge" id="encryptionBadge">
|
||||
E2E Encrypted
|
||||
|
||||
Reference in New Issue
Block a user