Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#50287 new defect (bug)

FS_METHOD=ssh2 breaks some plugins

Reported by: denkoren's profile denkoren Owned by:
Milestone: Awaiting Review Priority: normal
Severity: minor Version: 5.4.1
Component: Filesystem API Keywords: has-patch
Focuses: Cc:

Description

Some plugins expect WS_Filesystem() call to work properly without options.
SSH2 method requires several options to work. When plugin does not call request_filesystem_credentials() it becomes broken by FS_METHOD=ssh2 constant.

WordPress can use FTP_* constants as defaults in WP_Filesystem_SSH2 when none options are provided to constructor.

Change History (4)

#1 follow-up: @denkoren
4 years ago

I created a patch and PR on github, added this ticket's link to the description but it was not attached to ticket for some reason.

Here is the PR: https://github.com/WordPress/WordPress/pull/472

#2 @SergeyBiryukov
4 years ago

  • Component changed from General to Filesystem API

#3 in reply to: ↑ 1 @SergeyBiryukov
4 years ago

Replying to denkoren:

I created a patch and PR on github, added this ticket's link to the description but it was not attached to ticket for some reason.

Here is the PR: https://github.com/WordPress/WordPress/pull/472

Thanks for the PR! I think the attachment didn't work because https://github.com/WordPress/WordPress is a mirror of the build repo, not the development repo. It should work on https://github.com/WordPress/wordpress-develop.

This ticket was mentioned in PR #504 on WordPress/wordpress-develop by DenKoren.


4 years ago
#4

  • Keywords has-patch added

Ticket: https://core.trac.wordpress.org/ticket/50287

Some of plugins expect FS_METHOD to be direct to control their files
They do not ask for credentials and do not expect WP_Filesystem() can
require ones.

This commit makes WP_Filesystem() with FS_METHOD='ssh2' to use FTP_*
constants as default settings when none are provided to constructor.

Note: See TracTickets for help on using tickets.