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 5 commits into from Jan 24, 2022


Copy link

@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:
  • 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 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

@wsanchez wsanchez left a comment

Looks good. Thanks for all the new comments.

@exarkun exarkun merged commit a033c84 into trunk Jan 24, 2022
14 checks passed
@exarkun exarkun deleted the 10293-conch-sftp-close-invalid-handle branch Jan 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants