summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2024-08-22 23:36:26 -0400
committerpommicket <pommicket@gmail.com>2024-08-22 23:36:26 -0400
commita685c63f83bc12ac36d587c7c31ebf5dd170d5b4 (patch)
tree2c21b4378db748d2ce0a61f1660bd5d5fe52b831 /server
parentae028a28f7a40b527512e362d9f059ff427493f4 (diff)
adjustable piece size, etc.
Diffstat (limited to 'server')
-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);