mirror of
https://github.com/whoswhip/Sharpbin.git
synced 2026-12-06 02:48:43 +00:00
fix: enhance paste size validation logic
This commit is contained in:
@@ -252,7 +252,7 @@
|
|||||||
? estimateEncryptedSize(content + (e.data ?? ''))
|
? estimateEncryptedSize(content + (e.data ?? ''))
|
||||||
: new TextEncoder().encode(content + (e.data ?? '')).length;
|
: new TextEncoder().encode(content + (e.data ?? '')).length;
|
||||||
|
|
||||||
if (futureSize > data.options.maxPasteSize) {
|
if (futureSize > data.options.maxPasteSize && (e.data?.length ?? Number.MAX_SAFE_INTEGER < content.length)) {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user