Skip to content

Commit 4e9381b

Browse files
authored
Add compatibility for Firefox 147 (#1510)
1 parent a7cc81c commit 4e9381b

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

dissect/target/plugins/apps/browser/firefox.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,14 @@ class FirefoxPlugin(BrowserPlugin):
7070
# Windows
7171
"AppData/Roaming/Mozilla/Firefox/Profiles",
7272
"AppData/local/Mozilla/Firefox/Profiles",
73-
# Linux
73+
# Linux (146 and before)
7474
".mozilla/firefox",
7575
"snap/firefox/common/.mozilla/firefox",
7676
".var/app/org.mozilla.firefox/.mozilla/firefox",
77+
# Linux (147 and newer) uses XDG_CONFIG_HOME by default
78+
".config/mozilla/firefox",
79+
"snap/firefox/common/.config/mozilla/firefox",
80+
".var/app/org.mozilla.firefox/.config/mozilla/firefox",
7781
# macOS
7882
"Library/Application Support/Firefox",
7983
)

tests/plugins/apps/browser/test_firefox.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,3 +392,15 @@ def test_passwords_backup(target_win_users: Target, fs_win: VirtualFilesystem) -
392392
records[-1].source
393393
== "C:\\Users\\John\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\8jb1c7qs.default-release\\logins-backup.json"
394394
)
395+
396+
397+
def test_firefox_linux_xdg_config_home(target_unix_users: Target, fs_unix: VirtualFilesystem) -> None:
398+
"""Test if we find Mozilla Firefox Linux default XDG_CONFIG_HOME locations."""
399+
400+
fs_unix.map_dir(
401+
"/home/user/.config/mozilla/firefox/g1rbw8y7.Profile Name",
402+
absolute_path("_data/plugins/apps/browser/firefox/generic"),
403+
)
404+
405+
plugin = target_unix_users.add_plugin(FirefoxPlugin)
406+
assert str(plugin.installs[0][1]) == "/home/user/.config/mozilla/firefox"

0 commit comments

Comments
 (0)