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

10293 Fix conch handling of invalid handle in CLOSE request of sftp server #1685

Merged
merged 5 commits into from Jan 24, 2022

Conversation

exarkun
Copy link
Member

@exarkun exarkun commented Jan 24, 2022

Scope and purpose

When FileTransferServer tries to process a CLOSE request with a handle identifier that is not open it tries to call self._ebClose. There is no such attribute so this raises an AttributeError and never responds to the request.

Contributor Checklist:

  • The associated ticket in Trac is here: https://twistedmatrix.com/trac/ticket/10293
  • I ran tox -e lint to format my patch to meet the Twisted Coding Standard
  • I have created a newsfragment in src/twisted/newsfragments/ (see: News files)
  • The title of the PR starts with the associated Trac ticket number (without the # character).
  • I have updated the automated tests and checked that all checks for the PR are green.
  • I have submitted the associated Trac ticket for review by adding the word review to the keywords field in Trac, and putting a link to this PR in the comment; it shows up in https://twisted.reviews/ now.
  • The merge commit will use the below format
    The first line is automatically generated by GitHub based on PR ID and branch name.
    The other lines generated by GitHub should be replaced.
Merge pull request #123 from twisted/4356-branch-name-with-trac-id

Author: exarkun
Reviewer: wsanchez
Fixes: ticket:10293

Handle close of an invalid handle in Conch's SFTP server by sending
an error response instead of raising an unhandled AttributeError and
never responding to the request.

Copy link
Member

@wsanchez wsanchez left a comment

Choose a reason for hiding this comment

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

Looks good. Thanks for all the new comments.

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.

None yet

2 participants