You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using ente, a directory and sqlite3 database is created in the user's home folder:
$ file ~/ente/.ente.authenticator.db
/home/nktnet/ente/.ente.authenticator.db: SQLite 3.x database, user version 1, last written using SQLite version 3046000, file counter 2, database pages 4, cookie 0x1, schema 4, UTF-8, version-valid-for 2
Deleting/renaming the directory means that user details are lost.
Worse, having a file with path ~/ente instead of a directory means that ente-auth will load infinitely (as it cannot read from the sqlite database).
A better way to store user configurations would be to follow the standards set by XDG Base Directory, whereby this sqlite database file is stored in $XDG_DATA_HOME, e.g.
${XDG_DATA_HOME}/ente/.ente.authenticator.db # which defaults to:
${HOME}/.local/share/.ente/.ente.authenticator.db
This is similar to #2563, where ente is using ~/temp instead of ${XDG_CACHE_HOME}/ente, leading to user files being unintentionally deleted.
nktnet1
changed the title
[auth] [linux] ente storing config in user home directory
[auth] [linux] ente storing config in user home directory - infinite loading if ~/ente exists
Jul 28, 2024
nktnet1
changed the title
[auth] [linux] ente storing config in user home directory - infinite loading if ~/ente exists
[auth] [linux] ente config in user home - infinite loading if ~/ente exists
Jul 28, 2024
nktnet1
changed the title
[auth] [linux] ente config in user home - infinite loading if ~/ente exists
[auth] [linux] ente data in user home - infinite loading if ~/ente file exists
Jul 28, 2024
Description
When using ente, a directory and sqlite3 database is created in the user's home folder:
$ file ~/ente/.ente.authenticator.db /home/nktnet/ente/.ente.authenticator.db: SQLite 3.x database, user version 1, last written using SQLite version 3046000, file counter 2, database pages 4, cookie 0x1, schema 4, UTF-8, version-valid-for 2
Deleting/renaming the directory means that user details are lost.
Worse, having a file with path
~/ente
instead of a directory means thatente-auth
will load infinitely (as it cannot read from the sqlite database).A better way to store user configurations would be to follow the standards set by XDG Base Directory, whereby this sqlite database file is stored in
$XDG_DATA_HOME
, e.g.This is similar to #2563, where ente is using
~/temp
instead of${XDG_CACHE_HOME}/ente
, leading to user files being unintentionally deleted.The code in question is below:
ente/auth/lib/store/authenticator_db.dart
Lines 13 to 39 in 8d91b85
Thanks ~
Version
v3.0.17
What product are you using?
Ente Auth (installed ente-auth-bin from AUR)
What platform are you using?
Desktop - Linux
The text was updated successfully, but these errors were encountered: