[Pkg-privacy-commits] [onionshare] 59/256: Revert "Added a function to remove HTML from file and directory names"

Ulrike Uhlig ulrike at moszumanska.debian.org
Fri May 26 12:53:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

ulrike pushed a commit to branch master
in repository onionshare.

commit bfbf006c57a7ddf141ff726bf61b87eb23118c28
Author: Garrett Robinson <garrett.f.robinson at gmail.com>
Date:   Fri Dec 30 12:04:09 2016 -0500

    Revert "Added a function to remove HTML from file and directory names"
    
    This reverts commit 11c5f5b699d302edfda15a1d7bfd3ed2fec87a59.
---
 onionshare/web.py | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/onionshare/web.py b/onionshare/web.py
index d7116bb..e50c0ed 100644
--- a/onionshare/web.py
+++ b/onionshare/web.py
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 You should have received a copy of the GNU General Public License
 along with this program.  If not, see <http://www.gnu.org/licenses/>.
 """
-import queue, mimetypes, platform, os, sys, socket, logging, re
+import queue, mimetypes, platform, os, sys, socket, logging
 from urllib.request import urlopen
 from flask import Flask, Response, request, render_template_string, abort
 
@@ -41,11 +41,9 @@ def set_file_info(filenames, processed_size_callback=None):
     # build file info list
     file_info = {'files': [], 'dirs': []}
     for filename in filenames:
-        # strips trailing '/' and sanitizes filename
-        basename = sanitize_html(os.path.basename(filename.rstrip('/')))
         info = {
             'filename': filename,
-            'basename': basename
+            'basename': os.path.basename(filename.rstrip('/'))
         }
         if os.path.isfile(filename):
             info['size'] = os.path.getsize(filename)
@@ -55,8 +53,6 @@ def set_file_info(filenames, processed_size_callback=None):
             info['size'] = helpers.dir_size(filename)
             info['size_human'] = helpers.human_readable_filesize(info['size'])
             file_info['dirs'].append(info)
-
-    # sort list of files and directories by basename
     file_info['files'] = sorted(file_info['files'], key=lambda k: k['basename'])
     file_info['dirs'] = sorted(file_info['dirs'], key=lambda k: k['basename'])
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/onionshare.git



More information about the Pkg-privacy-commits mailing list