Skip to content

[Fix]: Keep usage history and logs out of backups - #226

Open
Dx-Alz-xD wants to merge 2 commits into
vinnovateit:mainfrom
Dx-Alz-xD:fix-backup-and-log-privacy
Open

Dx-Alz-xD wants to merge 2 commits into
vinnovateit:mainfrom
Dx-Alz-xD:fix-backup-and-log-privacy

Conversation

@Dx-Alz-xD

Copy link
Copy Markdown
Contributor
  • Android backups and device transfers now exclude the session database and log files.
  • Debug lines stay out of logcat in release builds.
  • The desktop log directory is private to its owner where POSIX permissions exist.

Behaviour change: usage history no longer comes back after a reinstall or device transfer.

Platforms:Android, Linux, macOS.

Exclude the session database and log files from Android backups and
device transfers, keep debug lines out of logcat in release builds, and
make the desktop log directory private to its owner.
@ameyakakade

Copy link
Copy Markdown
Contributor

Some notes:

  • Excluding logs from backups is correct.

  • Using posix functions to set permission for only the log directory feels hacky, it should be contained in 'AppPaths.kt' and work for all OS.

  • I don't understand why logs are disabled for android, some explanation would help.

AppPaths now creates the data directory owner-only (rwx------) on macOS and Linux, which covers the logs, history, settings and credentials kept inside it. Windows keeps the data under %LOCALAPPDATA%, which already admits only the user, SYSTEM and Administrators. FileLogger no longer sets permissions itself.
@Dx-Alz-xD

Copy link
Copy Markdown
Contributor Author

Some notes:

  • Excluding logs from backups is correct.
  • Using posix functions to set permission for only the log directory feels hacky, it should be contained in 'AppPaths.kt' and work for all OS.
  • I don't understand why logs are disabled for android, some explanation would help.

moved the permission handling into AppPaths. it now makes the whole data dir owner-only (rwx------) on macOS and Linux, which covers logs, the db, settings and creds in one place, and FileLogger is back to just logging. on Windows the data is under %LOCALAPPDATA%, which already only allows the user, SYSTEM and admins, so there’s nothing extra to set there. happy to enforce an explicit ACL too if you want that

android logs aren’t disabled, only Log.d in release builds. warnings and errors still go to logcat. the debug lines include the wifi name, gateway ip, portal urls and session usage records, and release logcat can be read over adb and ends up in shared bug reports. debug builds still log everything

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants