Merged
Conversation
ColdHeat
reviewed
Dec 16, 2025
ctfcli/core/challenge.py
Outdated
| local_file_sha1sum = hash_file(lf) | ||
|
|
||
| if local_file_sha1sum == remote_file_sha1sum: | ||
| if not "checksum" in ignore and local_file_sha1sum == remote_file_sha1sum: |
Member
There was a problem hiding this comment.
I think should probably be called sha1sum since we don't technically use the checksum string but otherwise I'm okay with this
Member
|
Just to make sure the intention for this is to force a reupload of the file to the server right? |
Member
|
Okay I assume that this is for a situation where the file reference in the database is correct but the file itself needs to be reuploaded. I think this is okay but I imagine a better solution would be something like |
Contributor
Author
|
Yeah. I think issue i had was that I cleaned my s3 bucket but ctfd assumed that I still had the files uploaded. |
Member
|
@JPaja looks like I don't have permissions to edit your branch. Here's what I think this change should look like: # Allow users to specify sha1sum in ignore to force reuploads
if "sha1sum" not in ignore:
if local_file_sha1sum == remote_file_sha1sum:
continue |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Option to ignore file checksum in case physical files gets removed while file cache still exists in database