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

increase default network timeout #2542

Merged
merged 3 commits into from
Feb 1, 2024

Conversation

NicholasTanz
Copy link
Contributor

@NicholasTanz NicholasTanz commented Jan 15, 2024

Please fill in the fields below to submit a pull request. The more information
that is provided, the better.

Fixes #2442

Description of the changes being introduced by the pull request:
increase default network timeout from 4 sec to 30 sec.
Please verify and check that the pull request fulfills the following
requirements
:

  • The code follows the Code Style Guidelines
  • Tests have been added for the bug fix or new feature
  • Docs have been added for the bug fix or new feature

@coveralls
Copy link

coveralls commented Jan 15, 2024

Pull Request Test Coverage Report for Build 7529370954

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.803%

Totals Coverage Status
Change from base Build 7500606995: 0.0%
Covered Lines: 1358
Relevant Lines: 1381

💛 - Coveralls

@NicholasTanz
Copy link
Contributor Author

NicholasTanz commented Jan 15, 2024

Hey @jku , can you take a look at this PR when you get a chance? thanks

Copy link
Member

@jku jku left a comment

Choose a reason for hiding this comment

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

I think this is good, however:

  • There is a class docstring a few lines above this that now documents the wrong default value though -- I think that docstring sentence could be removed altogether so that the value isn't specified in two places (alternativelly the default settings could be made optional constructor arguments at which point their default values are documented by sphinx automatically)
  • I'd really like it if the git commit message explained why the change is done. e.g.
    trying to defend against slow retrieval attacks in a generic library is impossible 
    but too low timeouts mean failures in high latency systems (like tests running
    on CI).
    

I'll leave the approval for someone else as this was my suggestion in the first place -- @lukpueh do you have an opinion?

@lukpueh
Copy link
Member

lukpueh commented Jan 15, 2024

Works for me. AFAICS, we already acknowledged the problems with and the resulting lack of slow retrieval protection (#932). So I don't think this patch has any real security implications.

@NicholasTanz, can you please address @jku's comments? Happy to then approve.

…is impossible

but too low timeouts mean failures in high latency systems (like tests running
on CI).

Signed-off-by: E3E <[email protected]>
@NicholasTanz
Copy link
Contributor Author

NicholasTanz commented Jan 15, 2024

Works for me. AFAICS, we already acknowledged the problems with and the resulting lack of slow retrieval protection (#932). So I don't think this patch has any real security implications.

@NicholasTanz, can you please address @jku's comments? Happy to then approve.

yes sounds good, just made the changes @lukpueh

@jku jku self-requested a review February 1, 2024 20:01
Copy link
Member

@jku jku left a comment

Choose a reason for hiding this comment

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

Thanks, sorry we dropped the ball for two weeks.

changes look good. I might do a squash merge to get the commit message to be on the relevant commit... Let's see if this project allows that

@jku jku merged commit af4beb1 into theupdateframework:develop Feb 1, 2024
23 checks passed
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.

ngclient: Increase default network timeout
4 participants