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

Merged
merged 1 commit into from
Feb 6, 2025

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
@icewind1991 icewind1991 force-pushed the sftp-known-mtime branch 2 times, most recently from b8019e6 to 7aeabc9 Compare December 16, 2024 14:09
@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 added 3. to review Waiting for reviews and removed 2. developing Work in progress labels Dec 20, 2024
@blizzz blizzz mentioned this pull request Jan 8, 2025
This was referenced Jan 14, 2025
This was referenced Jan 21, 2025
@blizzz blizzz mentioned this pull request Jan 29, 2025
1 task
@blizzz blizzz modified the milestones: Nextcloud 31, Nextcloud 32 Jan 29, 2025
@susnux susnux merged commit 72e0bb7 into master Feb 6, 2025
193 checks passed
@susnux susnux deleted the sftp-known-mtime branch February 6, 2025 01:21
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 bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants