[tbb-commits] [Git][tpo/applications/tor-browser-build][main] Bug 17560: prevent disk leaks in $HOME/.local/share.

ma1 (@ma1) git at gitlab.torproject.org
Tue Nov 14 11:41:49 UTC 2023



ma1 pushed to branch main at The Tor Project / Applications / tor-browser-build


Commits:
0de02285 by hackademix at 2023-11-14T10:18:11+01:00
Bug 17560: prevent disk leaks in $HOME/.local/share.

- - - - -


2 changed files:

- projects/browser/RelativeLink/start-browser
- projects/browser/gtk3-settings.ini


Changes:

=====================================
projects/browser/RelativeLink/start-browser
=====================================
@@ -257,6 +257,20 @@ fi
 HOME="${PWD}"
 export HOME
 
+# Prevent disk leaks in $HOME/.local/share (tor-browser#17560)
+local_dir="$HOME/.local/"
+share_dir="$local_dir/share"
+if [ -d "$share_dir" ]; then
+    ( srm -r "$share_dir" ||
+      wipe -r "$share_dir" ||
+      find "$share_dir" -type f -exec shred -u {} \; ;
+      rm -rf "$share_dir"
+    ) > /dev/null 2>&1
+else
+    mkdir -p "$local_dir"
+fi
+ln -fs /dev/null "$share_dir"
+
 [% IF c("var/tor-browser") -%]
 SYSARCHITECTURE=$(getconf LONG_BIT)
 TORARCHITECTURE=$(expr "$(file TorBrowser/Tor/tor)" : '.*ELF \([[:digit:]]*\)')


=====================================
projects/browser/gtk3-settings.ini
=====================================
@@ -1,2 +1,4 @@
 [Settings]
 gtk-primary-button-warps-slider = false
+gtk-recent-files-max-age=0
+gtk-recent-files-limit=0



View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0de02285584259398c8c96688aacb4431897d7a8

-- 
View it on GitLab: https://gitlab.torproject.org/tpo/applications/tor-browser-build/-/commit/0de02285584259398c8c96688aacb4431897d7a8
You're receiving this email because of your account on gitlab.torproject.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.torproject.org/pipermail/tbb-commits/attachments/20231114/342717f3/attachment-0001.htm>


More information about the tbb-commits mailing list