Closed campeon23 closed 1 year ago
Based on the feedback provided:
run()
function in main.go
around line 150.enablePprof
.keepParts
flag.keepParts
flag as intended.With these changes, the logic flaw has been rectified, ensuring the manifest decryption is based on the right conditions and not unrelated flags.
Given the above corrections, I'm marking this ticket as Closed. Should there be any further concerns or suggestions, please feel free to reopen.
Thank you for the thorough review and pointing out this crucial discrepancy in our logic.
Description:
While reviewing the logic in the run() function, I discovered that we are checking the enablePprof flag to decide whether to proceed with decrypting the manifest. This logic is flawed, as the decision to start the pprof server should be entirely independent of whether we decrypt the manifest.
What should be the correct determining factor is the keepParts flag. If we're keeping the part files, then we'll need to decrypt the manifest because it's essential for assembling the files later.
Recommended Solution:
Remove the condition that checks for enablePprof. Replace it with a condition that checks if keepParts is true. If keepParts is true, proceed to decrypt the manifest. This correction will ensure that we are making the decision to decrypt the manifest based on the correct conditions and not on unrelated flags.
Priority: Medium