summaryrefslogtreecommitdiff
path: root/server/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main.rs')
-rw-r--r--server/src/main.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/main.rs b/server/src/main.rs
index c923c7e..7de3d68 100644
--- a/server/src/main.rs
+++ b/server/src/main.rs
@@ -312,6 +312,9 @@ async fn handle_websocket(
.ok_or(Error::BadSyntax)?
.parse()
.map_err(|_| Error::BadSyntax)?;
+ if width < 3 || height < 3 {
+ return Err(Error::BadSyntax);
+ }
let url: String = parts.next().ok_or(Error::BadSyntax)?.replace(';', " ");
if url.len() > 2048 {
return Err(Error::ImageURLTooLong);