aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSaptak S <saptak013@gmail.com>2024-03-15 12:29:39 +0530
committerSaptak S <saptak013@gmail.com>2024-03-15 12:29:39 +0530
commit00b3109590448aea14d3cae034506013ada2b0e4 (patch)
treef8713e80bad413d6abd9373fdcbc6d80addf44bb
parentfe7bd43f04275a17cb3ab0d31e9a2f5c1ae3e263 (diff)
parentaae0f8f045eafcc88d70b23cdc1e7e38c39fae23 (diff)
downloadonionshare-00b3109590448aea14d3cae034506013ada2b0e4.tar.gz
onionshare-00b3109590448aea14d3cae034506013ada2b0e4.zip
Merge branch 'advisory-fix-1' of github.com:onionshare/onionshare-ghsa-24m9-8mf9-pqrj into release-2.6.2
-rw-r--r--desktop/onionshare/tab/mode/history.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/desktop/onionshare/tab/mode/history.py b/desktop/onionshare/tab/mode/history.py
index 3afdfc15..ad8af099 100644
--- a/desktop/onionshare/tab/mode/history.py
+++ b/desktop/onionshare/tab/mode/history.py
@@ -23,6 +23,7 @@ import subprocess
import os
from datetime import datetime
from PySide6 import QtCore, QtWidgets, QtGui
+from urllib.parse import unquote
from ... import strings
from ...widgets import Alert
@@ -464,7 +465,9 @@ class IndividualFileHistoryItem(HistoryItem):
self.common = common
self.id = id
- self.path = path
+ # Decode and sanitize the path to remove newlines
+ decoded_path = unquote(path)
+ self.path = decoded_path.replace("\r", "").replace("\n", "")
self.total_bytes = 0
self.downloaded_bytes = 0
self.started = time.time()