Skip to content
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

Local adapter clean user input before file access #1037

Merged
merged 10 commits into from
Dec 30, 2020

Conversation

nopcoder
Copy link
Contributor

@nopcoder nopcoder commented Dec 10, 2020

This change is Reviewable

@nopcoder nopcoder self-assigned this Dec 10, 2020
@nopcoder nopcoder requested a review from arielshaqed December 10, 2020 11:58
Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks! Hope this LGTMs :-)

@codecov-io
Copy link

codecov-io commented Dec 28, 2020

Codecov Report

Merging #1037 (6025577) into master (5db4690) will increase coverage by 0.12%.
The diff coverage is 56.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1037      +/-   ##
==========================================
+ Coverage   46.86%   46.99%   +0.12%     
==========================================
  Files         179      182       +3     
  Lines       14069    14301     +232     
==========================================
+ Hits         6594     6721     +127     
- Misses       6607     6686      +79     
- Partials      868      894      +26     
Impacted Files Coverage Δ
block/local/adapter.go 49.48% <56.00%> (-0.52%) ⬇️
config/config.go 31.36% <0.00%> (-1.98%) ⬇️
graveler/committed/sstable/manager.go 54.54% <0.00%> (-1.71%) ⬇️
pyramid/ro_file.go 50.00% <0.00%> (ø)
pyramid/eviction.go 86.66% <0.00%> (ø)
graveler/committed/tree/apply.go 60.46% <0.00%> (ø)
graveler/value.go
graveler/committed/tree/writer.go 58.51% <0.00%> (ø)
graveler/committed/tree/tree.go 35.71% <0.00%> (ø)
graveler/committed/tree/tree.pb.go 43.10% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fc3d23b...6025577. Read the comment docs.

Copy link
Contributor

@arielshaqed arielshaqed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Comment on lines 355 to 358
func isValidUploadID(uploadID string) bool {
_, err := strconv.ParseUint(uploadID, 16, 64)
return err != nil
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider returning error, and then using this error message to wrap ErrInvalidUploadIDFormat. That might give the caller more information about what went wrong.

@nopcoder nopcoder merged commit 60c9a64 into master Dec 30, 2020
@nopcoder nopcoder deleted the chore/local-adapter-path branch December 30, 2020 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants