wings
wings copied to clipboard
Add `sftp.read` to activity log
Adds sftp.read to activity log when file is read in SFTP.
Resolves https://github.com/pterodactyl/panel/issues/5136
Linked with PR https://github.com/pterodactyl/panel/pull/5148
Thank you for your submission.
I've looked into this, and it appears there used to be logging for SFTP read events. It was dropped during the migration to sqlite based event buffer. If memory serves, I believe it was deliberately removed due to performance concerns.
I personally do like the idea of this being available. Access though the panel is logged so makes sense to be consistent, even if it has to be gated behind a config flag. So I'll see what @matthewpi want's to do about this.
I don't think so that it would hit performance so much. I mean that sftp.read is very similar to sftp.write, except instead of trigerring on write, it triggers on read. sftp.write is already triggered very frequently without any performance issues, so all the more there will be no problems with sftp.read.
This must be gated behind a config option before I'd consider merging it. While someone could argue writing files produces a lot of logs as it stands, writing files is definitely something we want to know about while reads are less important. Especially over a protocol like SFTP where automated tooling may be used to sync files.
Should the option be enabled or disabled by default?
Should the option be enabled or disabled by default?
The option should be named enable and set to false by default
The option should be named
enableand set tofalseby default
Done