diff --git a/source/net/yacy/htroot/NetworkPicture.java b/source/net/yacy/htroot/NetworkPicture.java index 52b177f43..2f45d1e40 100644 --- a/source/net/yacy/htroot/NetworkPicture.java +++ b/source/net/yacy/htroot/NetworkPicture.java @@ -99,22 +99,8 @@ public class NetworkPicture { } //too small values lead to an error, too big to huge CPU/memory consumption, resulting in possible DOS. - if ( width < 320 ) { - width = 320; - } - if ( width > 1920 ) { - width = 1920; - } - if ( height < 240 ) { - height = 240; - } - if ( height > 1280 ) { - height = 1280; - } - if ( !authorized ) { - width = Math.min(1280, width); - height = Math.min(1280, height); - } + width = Math.min(2048, Math.max(320, width)); + height = Math.min(1280, Math.max(240, height)); if ( passiveLimit > 1000000 ) { passiveLimit = 1000000; }