Skip to content

CMake HTTP_ONLY does not disable SSH backends — SCP and SFTP remain usable #22740

Description

@bagder

I did this

The CMake HTTP_ONLY=ON option is documented as "Disable all protocols except HTTP" (CMakeLists.txt:538), but the implementation (CMakeLists.txt:541-557) only sets CURL_DISABLE_* flags for non-SSH protocols. It does not disable CURL_USE_LIBSSH2 or CURL_USE_LIBSSH. Since CURL_USE_LIBSSH2 defaults to ON, a build on any system with libssh2 installed produces a binary that advertises and accepts SCP and SFTP.

(Reported by Stanislav Fort)

I expected the following

HTTP_ONLY should also disable SCP and SFTP

curl/libcurl version

current git

operating system

independent

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions