From 2fd2f2939c62d1c7c63bcd824e63e783e21ddf02 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 22 Aug 2021 20:07:50 +0000 Subject: [PATCH 1/5] Use license file from gnu.org Downloaded from: https://www.gnu.org/licenses/gpl-3.0.txt and then the previous header was manually added. --- LICENSE | 8 ++++---- licenses/license-onionshare.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/LICENSE b/LICENSE index ed4e5238..d6405d0e 100644 --- a/LICENSE +++ b/LICENSE @@ -6,7 +6,7 @@ Copyright (C) 2014-2021 Micah Lee, et al. GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -650,7 +650,7 @@ the "copyright" line and a pointer to where the full notice is found. 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 . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -669,11 +669,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff --git a/licenses/license-onionshare.txt b/licenses/license-onionshare.txt index 77d05583..791c7620 100644 --- a/licenses/license-onionshare.txt +++ b/licenses/license-onionshare.txt @@ -3,7 +3,7 @@ Copyright (C) 2014-2018 Micah Lee GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 - Copyright (C) 2007 Free Software Foundation, Inc. + Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. @@ -647,7 +647,7 @@ the "copyright" line and a pointer to where the full notice is found. 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 . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -666,11 +666,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. From 252ba46d5c3ae24e7e4dff3a6824387d69c08c61 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 22 Aug 2021 20:18:52 +0000 Subject: [PATCH 2/5] Use HTTPS link instead of HTTP --- desktop/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/README.md b/desktop/README.md index 4a59fe03..a478bbef 100644 --- a/desktop/README.md +++ b/desktop/README.md @@ -39,7 +39,7 @@ These instructions include adding folders to the path in Windows. To do this, go Download Python 3.8.6, 32-bit (x86) from https://www.python.org/downloads/release/python-386/. I downloaded `python-3.8.6.exe`. When installing it, make sure to check the "Add Python 3.8 to PATH" checkbox on the first page of the installer. -Download and install 7-Zip from http://www.7-zip.org/download.html. I downloaded `7z1900.exe`. Add `C:\Program Files (x86)\7-Zip` to your path. +Download and install 7-Zip from https://7-zip.org/download.html. I downloaded `7z1900.exe`. Add `C:\Program Files (x86)\7-Zip` to your path. Install python dependencies: From f827d5232d0851f832d83390f31d1bc22128113d Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 22 Aug 2021 20:22:34 +0000 Subject: [PATCH 3/5] Fix shellcheck warnings --- desktop/scripts/dev.sh | 4 ++-- docs/build.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/desktop/scripts/dev.sh b/desktop/scripts/dev.sh index 6ce5e796..bf65e407 100755 --- a/desktop/scripts/dev.sh +++ b/desktop/scripts/dev.sh @@ -2,8 +2,8 @@ # Run OnionShare desktop, allowing you to use command-line arguments -SCRIPTS_DIR="$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )" -cd $SCRIPTS_DIR +SCRIPTS_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd ) +cd "$SCRIPTS_DIR" cd ../src python -c "import onionshare; onionshare.main()" $@ \ No newline at end of file diff --git a/docs/build.sh b/docs/build.sh index 4b147426..e30d6b31 100755 --- a/docs/build.sh +++ b/docs/build.sh @@ -1,6 +1,6 @@ #!/bin/bash -VERSION=`cat ../cli/onionshare_cli/resources/version.txt` +VERSION=$(cat ../cli/onionshare_cli/resources/version.txt) # Supported locales LOCALES="en fi pl pt_BR ru tr uk" From 601e215565a6b5518fc7c7883707106eda73fb9d Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 22 Aug 2021 20:17:55 +0000 Subject: [PATCH 4/5] Fix spelling --- CHANGELOG.md | 2 +- RELEASE.md | 2 +- cli/onionshare_cli/resources/static/js/chat.js | 2 +- desktop/src/onionshare/tab/mode/share_mode/__init__.py | 2 +- desktop/tests/gui_base_test.py | 2 +- docs/source/conf.py | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d65494a9..442f688f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -110,7 +110,7 @@ ## 1.3 * Major UI redesign, introducing many UX improvements -* Client-side web interfact redesigned +* Client-side web interface redesigned * New feature: Support for meek_lite pluggable transports (Amazon and Azure) - not yet ready for Windows or macOS, sorry * New feature: Support for custom obfs4 and meek_lite bridges (again, meek_lite not available on Windows/macOS yet) * New feature: Ability to cancel share before it starts diff --git a/RELEASE.md b/RELEASE.md index 948b5713..dd236aac 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -163,7 +163,7 @@ This will create `desktop/macOS/OnionShare.dmg`, signed and notarized. ## Source package -To make a source package, run `./build-source.sh $TAG`, where `$TAG` is the the name of the signed git tag, e.g. `v2.1`. +To make a source package, run `./build-source.sh $TAG`, where `$TAG` is the name of the signed git tag, e.g. `v2.1`. This will create `dist/onionshare-$VERSION.tar.gz`. diff --git a/cli/onionshare_cli/resources/static/js/chat.js b/cli/onionshare_cli/resources/static/js/chat.js index de64c094..35113df5 100644 --- a/cli/onionshare_cli/resources/static/js/chat.js +++ b/cli/onionshare_cli/resources/static/js/chat.js @@ -148,7 +148,7 @@ var getScrollDiffBefore = function () { var scrollBottomMaybe = function (scrollDiff) { // Scrolls to bottom if the user is scrolled at bottom - // if the user has scrolled upp, it wont scroll at bottom. + // if the user has scrolled up, it won't scroll at bottom. // Note: when a user themselves send a message, it will still // scroll to the bottom even if they had scrolled up before. if (scrollDiff > 0) { diff --git a/desktop/src/onionshare/tab/mode/share_mode/__init__.py b/desktop/src/onionshare/tab/mode/share_mode/__init__.py index 5d3e3c35..614f3abb 100644 --- a/desktop/src/onionshare/tab/mode/share_mode/__init__.py +++ b/desktop/src/onionshare/tab/mode/share_mode/__init__.py @@ -248,7 +248,7 @@ class ShareMode(Mode): def start_server_step3_custom(self): """ - Step 3 in starting the server. Remove zip progess bar, and display large filesize + Step 3 in starting the server. Remove zip progress bar, and display large filesize warning, if applicable. """ # Remove zip progress bar diff --git a/desktop/tests/gui_base_test.py b/desktop/tests/gui_base_test.py index ea95eef7..9fbb4309 100644 --- a/desktop/tests/gui_base_test.py +++ b/desktop/tests/gui_base_test.py @@ -178,7 +178,7 @@ class GuiBaseTest(unittest.TestCase): self.assertEqual(tab.get_mode().history.isVisible(), not currently_visible) def history_indicator(self, tab, indicator_count="1"): - """Test that we can make sure the history is toggled off, do an action, and the indiciator works""" + """Test that we can make sure the history is toggled off, do an action, and the indicator works""" # Make sure history is toggled off if tab.get_mode().history.isVisible(): tab.get_mode().toggle_history.click() diff --git a/docs/source/conf.py b/docs/source/conf.py index b20e51db..a37cf491 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -16,7 +16,7 @@ languages = [ ("Русский", "ru"), # Russian # ("Español", "es"), # Spanish ("Türkçe", "tr"), # Turkish - ("Українська", "uk"), # Ukranian + ("Українська", "uk"), # Ukrainian ] versions = ["2.3", "2.3.1", "2.3.2", "2.3.3", "2.4"] From cea34725f1abf80612fe00e4e4feac0479aef52b Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 22 Aug 2021 20:21:09 +0000 Subject: [PATCH 5/5] Fix whitespace issues * make sure files contain a final newline * use consistent indentation * trim excess whitespace * trim trailing whitespace --- .circleci/config.yml | 2 +- .github/workflows/codeql-analysis.yml | 2 +- build-source.sh | 6 +++--- cli/onionshare_cli/resources/static/css/style.css | 12 ++++++------ cli/onionshare_cli/resources/static/js/chat.js | 2 +- cli/onionshare_cli/resources/templates/403.html | 2 +- cli/onionshare_cli/resources/templates/404.html | 2 +- cli/onionshare_cli/resources/templates/405.html | 2 +- cli/onionshare_cli/resources/templates/500.html | 2 +- desktop/scripts/dev.sh | 2 +- docs/README.md | 2 +- docs/source/develop.rst | 2 +- snap/snapcraft.yaml | 10 +++++----- 13 files changed, 24 insertions(+), 24 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 175595f3..7ed09749 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -30,7 +30,7 @@ jobs: command: | cd ~/repo/cli poetry run pytest -v ./tests - + test-gui: docker: - image: circleci/python:3.8-buster diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index f1d47856..2285b1fc 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -47,7 +47,7 @@ jobs: # Prefix the list here with "+" to use these queries and those in the config file. # queries: ./path/to/local/query, your-org/your-repo/queries@main - # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild uses: github/codeql-action/autobuild@v1 diff --git a/build-source.sh b/build-source.sh index add57583..0946683d 100755 --- a/build-source.sh +++ b/build-source.sh @@ -4,7 +4,7 @@ # Usage display_usage() { - echo "Usage: $0 [tag]" + echo "Usage: $0 [tag]" } if [ $# -lt 1 ] @@ -46,13 +46,13 @@ then echo "Tag does not verify" exit 1 fi -cat ../verify.txt |grep "using RSA key 927F419D7EC82C2F149C1BD1403C2657CD994F73" +cat ../verify.txt | grep "using RSA key 927F419D7EC82C2F149C1BD1403C2657CD994F73" if [ $? -ne 0 ] then echo "Tag signed with wrong key" exit 1 fi -cat ../verify.txt |grep "^gpg: Good signature from" +cat ../verify.txt | grep "^gpg: Good signature from" if [ $? -ne 0 ] then echo "Tag verification missing 'Good signature from'" diff --git a/cli/onionshare_cli/resources/static/css/style.css b/cli/onionshare_cli/resources/static/css/style.css index 7cec9738..79be31d0 100644 --- a/cli/onionshare_cli/resources/static/css/style.css +++ b/cli/onionshare_cli/resources/static/css/style.css @@ -320,15 +320,15 @@ div#uploads .upload .upload-status { } div#uploads .upload input.cancel { - color: #d0011b; + color: #d0011b; border: 0; background: none; box-shadow: none; border-radius: 0px; - cursor: pointer; - font-family: sans-serif; - font-size: 12px; - text-decoration: none; + cursor: pointer; + font-family: sans-serif; + font-size: 12px; + text-decoration: none; display: inline-block; float:right; } @@ -398,4 +398,4 @@ a { a:visited { color: #601ca0; -} \ No newline at end of file +} diff --git a/cli/onionshare_cli/resources/static/js/chat.js b/cli/onionshare_cli/resources/static/js/chat.js index 35113df5..b4ef30df 100644 --- a/cli/onionshare_cli/resources/static/js/chat.js +++ b/cli/onionshare_cli/resources/static/js/chat.js @@ -11,7 +11,7 @@ $(function () { // Store current username received from app context var current_username = $('#username').val(); - // On browser connect, emit a socket event to be added to + // On browser connect, emit a socket event to be added to // room and assigned random username socket.on('connect', function () { socket.emit('joined', {}); diff --git a/cli/onionshare_cli/resources/templates/403.html b/cli/onionshare_cli/resources/templates/403.html index c9d28eea..eff250e6 100644 --- a/cli/onionshare_cli/resources/templates/403.html +++ b/cli/onionshare_cli/resources/templates/403.html @@ -4,7 +4,7 @@ OnionShare: 403 Forbidden - + diff --git a/cli/onionshare_cli/resources/templates/404.html b/cli/onionshare_cli/resources/templates/404.html index e816f2c4..c921aa3e 100644 --- a/cli/onionshare_cli/resources/templates/404.html +++ b/cli/onionshare_cli/resources/templates/404.html @@ -4,7 +4,7 @@ OnionShare: 404 Not Found - + diff --git a/cli/onionshare_cli/resources/templates/405.html b/cli/onionshare_cli/resources/templates/405.html index 63888004..76c32c19 100644 --- a/cli/onionshare_cli/resources/templates/405.html +++ b/cli/onionshare_cli/resources/templates/405.html @@ -4,7 +4,7 @@ OnionShare: 405 Method Not Allowed - + diff --git a/cli/onionshare_cli/resources/templates/500.html b/cli/onionshare_cli/resources/templates/500.html index 9f6727d2..f6501a21 100644 --- a/cli/onionshare_cli/resources/templates/500.html +++ b/cli/onionshare_cli/resources/templates/500.html @@ -4,7 +4,7 @@ OnionShare: An error occurred - + diff --git a/desktop/scripts/dev.sh b/desktop/scripts/dev.sh index bf65e407..18fade68 100755 --- a/desktop/scripts/dev.sh +++ b/desktop/scripts/dev.sh @@ -6,4 +6,4 @@ SCRIPTS_DIR=$( cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd ) cd "$SCRIPTS_DIR" cd ../src -python -c "import onionshare; onionshare.main()" $@ \ No newline at end of file +python -c "import onionshare; onionshare.main()" $@ diff --git a/docs/README.md b/docs/README.md index 029217bb..fbcf06d9 100644 --- a/docs/README.md +++ b/docs/README.md @@ -27,7 +27,7 @@ You will end up with the documentation in all supported locales in `docs/localiz Here's how preparing translations works: ```sh -# Generate .po files in build/gettext +# Generate .po files in build/gettext make gettext # Create a new blank German locale in source/locale, based on .po files diff --git a/docs/source/develop.rst b/docs/source/develop.rst index 042800c4..224c063f 100644 --- a/docs/source/develop.rst +++ b/docs/source/develop.rst @@ -40,7 +40,7 @@ Verbose mode When developing, it's convenient to run OnionShare from a terminal and add the ``--verbose`` (or ``-v``) flag to the command. This prints a lot of helpful messages to the terminal, such as when certain objects are initialized, when events occur (like buttons clicked, settings saved or reloaded), and other debug info. For example:: - $ $ poetry run onionshare-cli -v ~/Documents/roms/nes/Q-bert\ \(USA\).nes + $ poetry run onionshare-cli -v ~/Documents/roms/nes/Q-bert\ \(USA\).nes ╭───────────────────────────────────────────╮ │ * ▄▄█████▄▄ * │ │ ▄████▀▀▀████▄ * │ diff --git a/snap/snapcraft.yaml b/snap/snapcraft.yaml index 9bbc58ae..2b2ca61e 100644 --- a/snap/snapcraft.yaml +++ b/snap/snapcraft.yaml @@ -3,9 +3,9 @@ base: core18 version: '2.4' summary: Securely and anonymously share files, host websites, and chat using Tor description: | - OnionShare lets you securely and anonymously send and receive files. It works by starting - a web server, making it accessible as a Tor onion service, and generating an unguessable - web address so others can download files from you, or upload files to you. It does _not_ + OnionShare lets you securely and anonymously send and receive files. It works by starting + a web server, making it accessible as a Tor onion service, and generating an unguessable + web address so others can download files from you, or upload files to you. It does _not_ require setting up a separate server or using a third party file-sharing service. grade: stable # stable or devel @@ -23,7 +23,7 @@ apps: - removable-media environment: LANG: C.UTF-8 - + cli: common-id: org.onionshare.OnionShareCli command: onionshare-cli @@ -146,7 +146,7 @@ parts: - libssl-dev - zlib1g-dev after: [libevent] - + libevent: source: https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz source-checksum: sha256/92e6de1be9ec176428fd2367677e61ceffc2ee1cb119035037a27d346b0403bb