Severity: Medium Description: In the sendMessage controller, there is no validation to ensure that a message actually has content. The code blindly extracts text and image and saves the document. Impact: A user (or a malicious script) can send completely empty messages (where both text and image are undefined or empty strings). This leads to database clutter and can potentially break the frontend UI if it doesn't know how to render an empty message bubble.
Severity: Medium Description: In the sendMessage controller, there is no validation to ensure that a message actually has content. The code blindly extracts text and image and saves the document. Impact: A user (or a malicious script) can send completely empty messages (where both text and image are undefined or empty strings). This leads to database clutter and can potentially break the frontend UI if it doesn't know how to render an empty message bubble.