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

Consider root_dir and cwd in ssh_sftpd, if both are provided #1335

Merged
merged 1 commit into from
Feb 20, 2017

Conversation

kape1395
Copy link
Contributor

@kape1395 kape1395 commented Feb 8, 2017

The SFTPD server should use root_dir and cwd when resolving
file paths, if both are provided. The root directory should
be used for resolving absolute file names, and cwd should
be used for resolving relative paths.

@HansN HansN self-assigned this Feb 8, 2017
@HansN HansN added fix team:PS Assigned to OTP team PS testing currently being tested, tag is used by OTP internal CI labels Feb 8, 2017
end,
case is_within_root(Root, AbsFile) of
true -> AbsFile;
false -> Root
end.

Copy link
Contributor

Choose a reason for hiding this comment

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

The three case statements above has a bit unusual indentation for being Erlang. Please follow the usual conventions to make it easier to read ('e' in 'end' on same column as 'c' in the corresponding 'case' etc).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I fixed the code indentation, rebased on new maint and squashed the commits.

The SFTPD server should use root_dir and cwd when resolving
file paths, if both are provided. The root directory should
be used for resolving absolute file names, and cwd should
be used for resolving relative paths.
@HansN HansN added testing currently being tested, tag is used by OTP internal CI and removed testing currently being tested, tag is used by OTP internal CI labels Feb 13, 2017
@HansN
Copy link
Contributor

HansN commented Feb 13, 2017

Thanks for the updates, I've added the branch to our nightly tests.

@HansN HansN removed the testing currently being tested, tag is used by OTP internal CI label Feb 16, 2017
@HansN HansN merged commit 859ac82 into erlang:maint Feb 20, 2017
@HansN
Copy link
Contributor

HansN commented Feb 20, 2017

Merged! Thanks for the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix team:PS Assigned to OTP team PS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants