2 changes: 1 addition & 1 deletion LICENSE-0BSD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright 2016-2022 Rusty Bird <rustybird@net-c.com>
Copyright 2016-2023 Rusty Bird <rustybird@net-c.com>

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
Expand Down
35 changes: 35 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,38 @@
qubes-split-browser (0.15.5-1) unstable; urgency=medium

* (packaging): debian: Update standards version
* Update copyright year
* split-browser: Increase pipe capacity

-- Rusty Bird <rustybird@net-c.com> Mon, 16 Jan 2023 12:57:19 +0000

qubes-split-browser (0.15.4-1) unstable; urgency=medium

* split-browser: Fix '--safest' Security Level for Tor Browser 12

-- Rusty Bird <rustybird@net-c.com> Wed, 07 Dec 2022 21:55:55 +0000

qubes-split-browser (0.15.3-1) unstable; urgency=medium

* Hide display language notification

-- Rusty Bird <rustybird@net-c.com> Wed, 07 Dec 2022 20:15:54 +0000

qubes-split-browser (0.15.2-1) unstable; urgency=medium

* split-browser: Simplify Python oneliner
* split-browser-{login,bookmark}: Allow notify-send to fail

-- Rusty Bird <rustybird@net-c.com> Wed, 30 Nov 2022 14:23:52 +0000

qubes-split-browser (0.15.1-1) unstable; urgency=medium

* (packaging): debian: Bump debhelper compat to 12
* sb.js: Ensure Ctrl-Shift-s error messages can be displayed
* split-browser-bookmark: Fix XML-escaping with Bash 5.2+

-- Rusty Bird <rustybird@net-c.com> Tue, 15 Nov 2022 09:34:44 +0000

qubes-split-browser (0.15.0-1) unstable; urgency=medium

[ Frédéric Pierret (fepitre) ]
Expand Down
1 change: 0 additions & 1 deletion debian/compat

This file was deleted.

4 changes: 2 additions & 2 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Source: qubes-split-browser
Section: web
Priority: optional
Maintainer: Rusty Bird <rustybird@net-c.com>
Build-Depends: debhelper (>= 10)
Standards-Version: 4.6.1
Build-Depends: debhelper-compat (= 12)
Standards-Version: 4.6.2
Homepage: https://github.com/rustybird/qubes-app-split-browser
Vcs-Git: https://github.com/rustybird/qubes-app-split-browser.git

Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.0
0.15.5
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
command: "/bin/bash",
arguments: ["-lc",
"exec /usr/lib/qubes/qvm-move-to-vm.kde * &>/dev/null"],
environment: {},
environment: { LC_CTYPE: "C.UTF-8" },
workdir: PrefBranch.getComplexValue("browser.download.dir",
Ci.nsIPrefLocalizedString).data
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ pref("browser.aboutConfig.showWarning", false);
pref("browser.tabs.warnOnClose", false);
pref("devtools.chrome.enabled", true);
pref("extensions.torbutton.launch_warning", false);
pref("intl.language_notification.shown", true);
pref("privacy.prioritizeonions.showNotification", false);
12 changes: 8 additions & 4 deletions vm/qubes-split-browser/usr/bin/split-browser
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ for arg; do
--safest set Tor Browser's Security Level to Safest; equivalent to
--pref='pref("extensions.torbutton.security_slider", 1);'
--pref='lockPref("browser.security_level.security_slider", 1);'
--pref=<line> additional browser preference line, appended after those
stored in /etc/split-browser/prefs/*.js and
Expand All @@ -35,7 +35,7 @@ for arg; do
END
;;
--safest|--high) # --high is deprecated
cli_prefs+=( 'pref("extensions.torbutton.security_slider", 1);' )
cli_prefs+=( 'lockPref("browser.security_level.security_slider", 1);' )
;;
--pref=*)
cli_prefs+=( "${arg#*=}" )
Expand Down Expand Up @@ -65,7 +65,7 @@ sanitize_ascii() { # replace any byte with _ but printable ASCII, tab, newline
sanitize_utf-8() { # replace null byte with _; then validate as UTF-8
LC_ALL=C stdbuf -oL tr '\0' _ |
LC_ALL=C PYTHONIOENCODING=utf-8:strict \
python3 -Suc $'import sys\nfor line in sys.stdin: sys.stdout.write(line)'
python3 -Suc 'import sys; sys.stdout.writelines(sys.stdin)'
}


Expand All @@ -89,9 +89,13 @@ dispvm() (
mkfifo -- "$SB_CMD_INPUT".tmp
exec {cmd_fd}<>"$SB_CMD_INPUT".tmp

# 1031 is fcntl.F_SETPIPE_SZ in Python 3.10+
python3 -Sc 'import fcntl; fcntl.fcntl(0, 1031, 1024**2)' <&"$cmd_fd" ||
true

d=/etc/qubes-rpc
bash_line="PATH=/usr/local$d:$d:\$PATH exec split-browser-disp"
printf '%s\n' "$bash_line" "$@" >&"$cmd_fd" # 64 KB pipe capacity
printf '%s\n' "$bash_line" "$@" >&"$cmd_fd"
mv -T -- "$SB_CMD_INPUT"{.tmp,}

{
Expand Down
15 changes: 8 additions & 7 deletions vm/qubes-split-browser/usr/bin/split-browser-bookmark
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ notify() {
local summary=$1 body=$2$'\n\n'$3

# XML-escape for the notification server
body=${body//&/&amp;}
body=${body//</&lt;}
body=${body//>/&gt;}
body=${body//\"/&quot;}
body=${body//\'/&apos;}
body=${body//'&'/'&amp;'}
body=${body//'<'/'&lt;'}
body=${body//'>'/'&gt;'}
body=${body//'"'/'&quot;'}
body=${body//"'"/'&apos;'}

# Escape backslash for GLib's g_strcompress() in libnotify's notify-send
body=${body//\\/\\\\}
# shellcheck disable=SC1003
body=${body//'\'/'\\'}

notify-send --expire-time=4000 -- "$summary" "$body"
notify-send --expire-time=4000 -- "$summary" "$body" || true
}


Expand Down
2 changes: 1 addition & 1 deletion vm/qubes-split-browser/usr/bin/split-browser-login
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ if [[ ${#matching_sites[@]} -gt 0 ]]; then
# in case the window manager's focus stealing prevention is too lax

ms=$(( SB_LOGIN_SECURITY_DELAY_SECONDS * 1000 ))
notify-send --expire-time="$ms" --urgency=low -- "$SB_ELLIPSIS"
notify-send --expire-time="$ms" --urgency=low -- "$SB_ELLIPSIS" || true
sleep -- "$SB_LOGIN_SECURITY_DELAY_SECONDS"
fi

Expand Down