-
Notifications
You must be signed in to change notification settings - Fork 388
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refuse uploading too big .zip files #1049
Conversation
libcodechecker/libhandlers/store.py
Outdated
@@ -315,6 +316,11 @@ def main(args): | |||
|
|||
try: | |||
assemble_zip(args.input, zip_file, client) | |||
|
|||
if os.stat(zip_file).st_size > MAX_UPLOAD_SIZE: | |||
LOG.error("The result list to upload is too big.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Write out the maximum uploadable file size too with an exclamation mark at the end of the sentence.
libcodechecker/libhandlers/store.py
Outdated
@@ -315,6 +316,11 @@ def main(args): | |||
|
|||
try: | |||
assemble_zip(args.input, zip_file, client) | |||
|
|||
if os.stat(zip_file).st_size > MAX_UPLOAD_SIZE: | |||
LOG.error("The result list to upload is too big (max: 1GB).") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the error message depend on the MAX_UPLOAD_SIZE variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a partial fix for #840 right? This should not close that ticket.
Otherwise LGTM.
The others items in #840 are already satisfied, So that can be closed. To be exact the 30 sec timeout is not done yet but that shouldn't be relevant, since there is no such a long action during storage. But the timeout can be increased later if needed. |
LGTM! |
I've created a new issue for the missing session improvement. #1072 |
Fixes #840