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

don't believe sftp when it tells us the mtime is less than we know it is #40105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

icewind1991
Copy link
Member

@icewind1991 icewind1991 commented Aug 29, 2023

work around misbehaving sftp servers by keeping track of when we modify things

apps/files_external/lib/Lib/Storage/SFTP.php Fixed Show fixed Hide fixed
@@ -413,14 +427,13 @@
return false;
}
if (!$this->file_exists($path)) {
$this->getConnection()->put($this->absPath($path), '');
return $this->getConnection()->put($this->absPath($path), '');

Check notice

Code scanning / Psalm

InternalMethod

The method phpseclib\Net\SFTP::put is internal to phpseclib but called from OCA\Files_External\Lib\Storage\SFTP::touch
use phpseclib\Net\SFTP\Stream;

/**
* Uses phpseclib's Net\SFTP class and the Net\SFTP\Stream stream wrapper to
* provide access to SFTP servers.
*/
class SFTP extends \OC\Files\Storage\Common {
class SFTP extends \OC\Files\Storage\Common {

Check notice

Code scanning / Psalm

DeprecatedInterface

OCP\Files\Storage is marked deprecated
@solracsf solracsf added this to the Nextcloud 28 milestone Nov 21, 2023
@blizzz blizzz mentioned this pull request Nov 22, 2023
5 tasks
@blizzz blizzz modified the milestones: Nextcloud 28, Nextcloud 29 Nov 23, 2023
@skjnldsv skjnldsv added the 2. developing Work in progress label Feb 21, 2024
This was referenced Mar 12, 2024
@Altahrim Altahrim mentioned this pull request Mar 20, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 29, Nextcloud 30 Mar 28, 2024
@skjnldsv skjnldsv modified the milestones: Nextcloud 30, Nextcloud 31 Aug 14, 2024
@icewind1991 icewind1991 force-pushed the sftp-known-mtime branch 2 times, most recently from c6c07c0 to cdc4fa4 Compare December 6, 2024 17:51
…ow it is

Signed-off-by: Robin Appelman <robin@icewind.nl>
@icewind1991 icewind1991 marked this pull request as ready for review December 16, 2024 15:42
@icewind1991 icewind1991 requested review from a team, ArtificialOwl, nfebe and come-nc and removed request for a team December 20, 2024 17:53
@icewind1991 icewind1991 removed the 2. developing Work in progress label Dec 20, 2024
@icewind1991 icewind1991 added the 3. to review Waiting for reviews label Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants