feat: improve share security
This commit is contained in:
@@ -31,7 +31,7 @@ const CreateUploadModalBody = ({
|
||||
.string()
|
||||
.required()
|
||||
.min(3)
|
||||
.max(100)
|
||||
.max(50)
|
||||
.matches(new RegExp("^[a-zA-Z0-9_-]*$"), {
|
||||
message: "Can only contain letters, numbers, underscores and hyphens",
|
||||
}),
|
||||
|
||||
@@ -25,7 +25,7 @@ const DownloadAllButton = ({ shareId }: { shareId: string }) => {
|
||||
setIsZipReady(share.isZipReady);
|
||||
if (share.isZipReady) clearInterval(timer);
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => clearInterval(timer));
|
||||
}, 5000);
|
||||
return () => {
|
||||
clearInterval(timer);
|
||||
|
||||
Reference in New Issue
Block a user