Skip to content

Commit

Permalink
Merge branch 'bugfix-vulnerability-warning' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
setvisible committed Nov 11, 2024
2 parents 4d5ca9a + b505b3e commit 098084a
Show file tree
Hide file tree
Showing 40 changed files with 304 additions and 319 deletions.
76 changes: 40 additions & 36 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
tags:
- "v*"
branches:
- "master"
- "develop"
- "github-actions"
- "gha-*"
Expand All @@ -26,7 +25,7 @@ env:
LibtorrentRasterbar_BUILD_DIR: ${{github.workspace}}/00/build/libtorrent-rasterbar
LibtorrentRasterbar_INSTALL_DIR: ${{github.workspace}}/00/install/libtorrent-rasterbar
# ^^
# HACK cache@v3: using '/00/' instead of '/../': Relative pathing '.' and '..' is not allowed.
# HACK actions/cache@v3: using '/00/' instead of '/../': Relative pathing '.' and '..' is not allowed.
LibtorrentRasterbar_VERSION_FILE: ${{github.workspace}}/3rd/libtorrent-rasterbar/include/libtorrent/version.hpp
Application_VERSION_FILE: ${{github.workspace}}/version
Changelog_FILE_NAME: ${{github.workspace}}/00/GIT-CHANGELOG.txt
Expand All @@ -42,7 +41,7 @@ jobs:
environment: production
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Create WebBrowser Addons
id: webaddons
Expand All @@ -69,13 +68,13 @@ jobs:
print(f"Addon_Web_Extension_Firefox={ artifact_firefox }", file=f)
- name: Upload Chromium Addon
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact_chromium
path: ${{ steps.webaddons.outputs.Addon_Web_Extension_Chromium }}

- name: Upload Firefox Addon
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact_firefox
path: ${{ steps.webaddons.outputs.Addon_Web_Extension_Firefox }}
Expand All @@ -92,7 +91,8 @@ jobs:
qt_host: 'linux'
qt_target: 'desktop'
qt_arch: 'gcc_64'
qt_tools: '' # To build OpenSSLv3: 'tools_opensslv3_src'
qt_tools: ''
qt_modules: ''
Qt6_CUSTOM_INSTALL_PATH: "/home/runner/work/ArrowDL/qt/"
DIRECTIVE_CMAKE_GENERATOR: ''
INSTALL_BOOST_PLATFORM_VERSION: '18.04' # 18.04, 20.04 Rem: Ubuntu 20.04 doesn't have Boost 1.77.0
Expand All @@ -103,6 +103,7 @@ jobs:
qt_target: 'desktop'
qt_arch: 'win64_mingw'
qt_tools: 'tools_opensslv3_x64'
qt_modules: ''
Qt6_CUSTOM_INSTALL_PATH: "D:\\a\\ArrowDL\\qt\\"
DIRECTIVE_CMAKE_GENERATOR: '-G "MinGW Makefiles"'
INSTALL_BOOST_PLATFORM_VERSION: '2019' # 2019, 2022
Expand All @@ -115,7 +116,7 @@ jobs:

steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

# - name: Clean Environment
# shell: python # otherwise Windows uses Powershell, Linux uses bash
Expand Down Expand Up @@ -224,7 +225,7 @@ jobs:
echo "LibtorrentRasterbar_VERSION: '${{env.LibtorrentRasterbar_VERSION}}'"
- name: Cache Libtorrent Static Libraries
uses: actions/cache@v3
uses: actions/cache@v4
id: cache-libtorrent
env:
LibtorrentRasterbar_VERSION: ${{ steps.getversion.outputs.LibtorrentRasterbar_VERSION }}
Expand All @@ -236,7 +237,7 @@ jobs:
${{env.LibtorrentRasterbar_INSTALL_DIR}}
- name: Install Boost
uses: MarkusJx/install-boost@v2.4.3
uses: MarkusJx/install-boost@v2.4.5
id: install-boost
with:
boost_version: ${{env.BOOST_VERSION}}
Expand All @@ -260,8 +261,8 @@ jobs:
ls -al
- name: Install Qt
uses: jurplel/install-qt-action@v3
# Rem: Once installed, ${{env.Qt6_DIR}} is set.
uses: jurplel/install-qt-action@v4
# Rem: Once installed, ${{env.QT_ROOT_DIR}} is set.
# https://ddalcino.github.io/aqt-list-server/
with:
aqtversion: '==3.1.*'
Expand All @@ -271,18 +272,21 @@ jobs:
target: ${{matrix.qt_target}}
arch: ${{matrix.qt_arch}}
tools: ${{matrix.qt_tools}}
modules: ${{matrix.qt_modules}}
cache: true

- name: List files in Qt (if Debug Logging is enabled)
if: runner.debug == '1'
shell: bash
run: cd "${{env.Qt6_DIR}}/../../" && ls -alR
# env.Qt6_DIR
# "/home/runner/work/ArrowDL/qt/Qt/6.3.1/gcc_64"
# "D:\a\ArrowDL\qt\Qt\6.3.1\mingw_64"

add-tools-to-path: false # WIP migration v3 to v4

# Rem: this step was commented because it's too expensive:
# - name: List files in Qt (if Debug Logging is enabled)
# if: runner.debug == '1'
# shell: bash
# run: cd "${{env.QT_ROOT_DIR}}/../../" && ls -alR
# # env.QT_ROOT_DIR
# # "/home/runner/work/ArrowDL/qt/Qt/6.3.1/gcc_64"
# # "D:\a\ArrowDL\qt\Qt\6.3.1\mingw_64"
#
- name: Find OpenSSL in Qt6
# The thing is that "env.Qt6_DIR" is defined only at runtime, *after* install-qt-action has run.
# The thing is that "env.QT_ROOT_DIR" is defined only at runtime, *after* install-qt-action has run.
id: qt6openssl
shell: python
# 2 versions present in Ubuntu:
Expand All @@ -292,14 +296,14 @@ jobs:
#
# * Qt6 version (3.0.12)
# To build it:
# openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSLv3", "src"))
# openssl_dir = os.path.normpath(os.path.join(r"${{env.QT_ROOT_DIR}}", "..", "..", "Tools", "OpenSSLv3", "src"))
# cd "${{openssl_dir}}"
# ./config
# make
# make test
# sudo make install_sw
# Then:
# openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSLv3", "src"))
# openssl_dir = os.path.normpath(os.path.join(r"${{env.QT_ROOT_DIR}}", "..", "..", "Tools", "OpenSSLv3", "src"))
# openssl_lib_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libcrypto.a"))
# openssl_ssl_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libssl.a"))
#
Expand All @@ -311,7 +315,7 @@ jobs:
# ssleay32 -> libssl
if "${{ matrix.os }}" == "windows-latest":
openssl_dir = os.path.normpath(os.path.join(r"${{env.Qt6_DIR}}", "..", "..", "Tools", "OpenSSLv3", "Win_x64"))
openssl_dir = os.path.normpath(os.path.join(r"${{env.QT_ROOT_DIR}}", "..", "..", "Tools", "OpenSSLv3", "Win_x64"))
openssl_lib_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libcrypto.lib"))
openssl_ssl_eay = os.path.normpath(os.path.join(openssl_dir, "lib", "libssl.lib"))
Expand All @@ -338,7 +342,7 @@ jobs:
if: ${{ steps.cache-libtorrent.outputs.cache-hit != 'true' }}
env:
Boost_ROOT: ${{ steps.install-boost.outputs.Boost_ROOT }}
Qt6_Dir2: ${{env.Qt6_DIR}}
Qt6_Dir2: ${{env.QT_ROOT_DIR}}
DIRECTIVE_CMAKE_GENERATOR: ${{matrix.DIRECTIVE_CMAKE_GENERATOR}}
BUILD_TESTS: "OFF" # OFF because they take 10+ minutes to build and 776.74 sec to run tests on Ubuntu
DEPRECATED_FUNCTIONS: "OFF" # OFF to remove deprecated functions
Expand Down Expand Up @@ -387,7 +391,7 @@ jobs:
- name: Configure Project
env:
Boost_ROOT: ${{ steps.install-boost.outputs.Boost_ROOT }}
Qt6_Dir2: ${{env.Qt6_DIR}}
Qt6_Dir2: ${{env.QT_ROOT_DIR}}
OpenSSL_ROOT_DIR: ${{ steps.qt6openssl.outputs.OpenSSL_ROOT_DIR }}
DIRECTIVE_CMAKE_GENERATOR: ${{matrix.DIRECTIVE_CMAKE_GENERATOR}}
working-directory: "${{env.Project_BUILD_DIR}}"
Expand Down Expand Up @@ -473,7 +477,7 @@ jobs:
- name: Upload Linux Portable
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
env:
TARBALL_NAME: "${{ steps.getversion.outputs.Application_Linux_NAME }}.tar.gz"
with:
Expand Down Expand Up @@ -501,7 +505,7 @@ jobs:
- name: Upload Windows MingGW x64 Portable
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
env:
ZIP_NAME: "${{ steps.getversion.outputs.Application_Windows_MinGW_x64_NAME }}.zip"
with:
Expand All @@ -510,7 +514,7 @@ jobs:

- name: Create NSIS installer
if: ${{ matrix.os == 'windows-latest' }}
uses: joncloud/makensis-action@v3.7
uses: joncloud/makensis-action@v4.1
env:
Application_VERSION: ${{ steps.getversion.outputs.Application_VERSION }}
with:
Expand All @@ -534,7 +538,7 @@ jobs:
- name: Upload Windows 64 Installer
if: ${{ matrix.os == 'windows-latest' }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: artifact_windows_64_installer
path: "${{env.Project_RELEASE_DIR}}/ArrowDL_x64_Setup.exe"
Expand All @@ -555,35 +559,35 @@ jobs:
- name: Download Chromium Addon
continue-on-error: true
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: artifact_chromium
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Firefox Addon
continue-on-error: true
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: artifact_firefox
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Linux Portable
continue-on-error: true
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: artifact_linux_portable
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Windows MinGW 64 Portable
continue-on-error: true
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: artifact_windows_mingw_64_portable
path: "${{env.Project_RELEASE_DIR}}"

- name: Download Windows 64 Installer
continue-on-error: true
uses: actions/download-artifact@v4.1.7
uses: actions/download-artifact@v4
with:
name: artifact_windows_64_installer
path: "${{env.Project_RELEASE_DIR}}"
Expand Down Expand Up @@ -614,7 +618,7 @@ jobs:
my_file.write("\r\n")
- name: Publish
uses: softprops/action-gh-release@v0.1.15
uses: softprops/action-gh-release@v2
#if: startsWith(github.ref, 'refs/tags/') # Limit releases to pushes to tags
env:
BRANCH_OR_TAG_NAME: ${{ github.head_ref || github.ref_name }}
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@ It aims to work with latest versions of Mozilla Firefox (powered by *WebExtensio

</details>

More screenshots on the [Gallery](https://www.arrow-dl.com/ArrowDL/category/screenshots.html "Go to Screenshots page") page.
More screenshots on the [Gallery](https://www.arrow-dl.com/screenshots/ "Go to Screenshots page") page.


## Installation

Go to [Download](https://www.arrow-dl.com/ArrowDL/category/download.html) page to install the application for your operating system.
Go to [Download](https://www.arrow-dl.com/download/) page to install the application for your operating system.

Rem: *Native-Client* is an alternative to *ArrowDL*. Click [here](NativeClient.md "NativeClient.md") for more information.

Expand All @@ -75,7 +75,7 @@ choco install arrowdl

## Usage

Go to [Tutorial](https://www.arrow-dl.com/ArrowDL/category/tutorial.html) page.
Go to [Tutorial](https://www.arrow-dl.com/tutorial/) page.

## Under the hood

Expand Down
2 changes: 1 addition & 1 deletion installer/windows/NSIS/setup.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
!define PRODUCT_VERSION ${VERSION}
!define PRODUCT_GROUP "Sebastien Vavassori"
!define PRODUCT_PUBLISHER "Sebastien Vavassori"
!define PRODUCT_WEB_SITE "https://www.arrow-dl.com/ArrowDL"
!define PRODUCT_WEB_SITE "https://www.arrow-dl.com/"

; Adds info to the installer
VIProductVersion "${PRODUCT_VERSION}.000"
Expand Down
10 changes: 5 additions & 5 deletions src/core/stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -951,11 +951,11 @@ StreamObject StreamAssetDownloader::parseDumpItemStdOut(const QByteArray &bytes)
QJsonDocument loadDoc(QJsonDocument::fromJson(bytes, &ok));
if (ok.error != QJsonParseError::NoError) {

qDebug() << Q_FUNC_INFO;
qDebug() << "! Error JSON:" << QJsonParseError::ParseError(ok.error);
qDebug() << " at position" << ok.offset;
qDebug() << bytes.mid(ok.offset - 20, ok.offset + 20);
qDebug() << QString("%0^").arg(QString().fill(' ', 20));
// qDebug() << Q_FUNC_INFO;
// qDebug() << "! Error JSON:" << QJsonParseError::ParseError(ok.error);
// qDebug() << " at position" << ok.offset;
// qDebug() << bytes.mid(ok.offset - 20, ok.offset + 20);
// qDebug() << QString("%0^").arg(QString().fill(' ', 20));

obj.setError(StreamObject::ErrorJsonFormat);
return obj;
Expand Down
8 changes: 4 additions & 4 deletions src/core/torrentcontext_p.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1172,10 +1172,10 @@ TorrentInitialMetaInfo WorkerThread::dump(const QString &filename) const
lt::error_code error_code;
const lt::torrent_info torrent_info(filename.toStdString(), error_code);
if (error_code) {
qWarning() << "failed to decode file '"
<< filename
<< "' due to"
<< QString::fromStdString(error_code.message());
// qWarning() << "failed to decode file '"
// << filename
// << "' due to"
// << QString::fromStdString(error_code.message());
return {};
}
auto ptr_torrent_info= std::make_shared<lt::torrent_info>(torrent_info);
Expand Down
2 changes: 1 addition & 1 deletion src/locale/arrowdl_ar_EG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ You can also use batch descriptors to download multiple files at one time.</sour
</message>
<message>
<location filename="../core/downloaditem.cpp" line="312"/>
<source>5xx Unknown serveur error</source>
<source>5xx Unknown server error</source>
<translation type="unfinished"/>
</message>
</context>
Expand Down
4 changes: 2 additions & 2 deletions src/locale/arrowdl_de_DE.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,8 +925,8 @@ You can also use batch descriptors to download multiple files at one time.</sour
</message>
<message>
<location filename="../core/downloaditem.cpp" line="312"/>
<source>5xx Unknown serveur error</source>
<translation type="unfinished"/>
<source>5xx Unknown server error</source>
<translation>5xx Unbekannter Serverfehler</translation>
</message>
</context>
<context>
Expand Down
2 changes: 1 addition & 1 deletion src/locale/arrowdl_en_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ You can also use batch descriptors to download multiple files at one time.</sour
</message>
<message>
<location filename="../core/downloaditem.cpp" line="312"/>
<source>5xx Unknown serveur error</source>
<source>5xx Unknown server error</source>
<translation type="unfinished"></translation>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion src/locale/arrowdl_es_BO.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ You can also use batch descriptors to download multiple files at one time.</sour
</message>
<message>
<location filename="../core/downloaditem.cpp" line="312"/>
<source>5xx Unknown serveur error</source>
<source>5xx Unknown server error</source>
<translation type="unfinished"/>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion src/locale/arrowdl_es_ES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ You can also use batch descriptors to download multiple files at one time.</sour
</message>
<message>
<location filename="../core/downloaditem.cpp" line="312"/>
<source>5xx Unknown serveur error</source>
<source>5xx Unknown server error</source>
<translation type="unfinished"/>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion src/locale/arrowdl_es_US.ts
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,7 @@ You can also use batch descriptors to download multiple files at one time.</sour
</message>
<message>
<location filename="../core/downloaditem.cpp" line="312"/>
<source>5xx Unknown serveur error</source>
<source>5xx Unknown server error</source>
<translation type="unfinished"/>
</message>
</context>
Expand Down
2 changes: 1 addition & 1 deletion src/locale/arrowdl_fr_FR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ Utiliser les délimiteurs de grappe, pour télécharger plusieurs fichiers en m
</message>
<message>
<location filename="../core/downloaditem.cpp" line="312"/>
<source>5xx Unknown serveur error</source>
<source>5xx Unknown server error</source>
<translation>5xx Erreur de serveur inconnue</translation>
</message>
</context>
Expand Down
Loading

0 comments on commit 098084a

Please sign in to comment.