Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Electron app dependencies with known vulnerabilities #6166

Merged
merged 4 commits into from
Apr 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Line wrap the file at 100 chars. Th
- Flush states on tunnel state changes. Previously, pre-existing connections could leak when
internet sharing was enabled on a device.

#### Windows
- Update electron-builder to 24.13.3 to fix CVE-2024-27303, which enabled privilege escelation when
running the installer.


## [2024.2-beta1] - 2024-04-15
### Added
Expand Down
12 changes: 12 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,18 @@ if [[ "$SIGN" == "true" && "$(uname -s)" == "MINGW"* ]]; then
done
fi

# notarize installer on macOS
if [[ "$NOTARIZE" == "true" && "$(uname -s)" == "Darwin" ]]; then
log_info "Notarizing pkg"
xcrun notarytool submit dist/*"$PRODUCT_VERSION"*.pkg \
--keychain "$NOTARIZE_KEYCHAIN" \
--keychain-profile "$NOTARIZE_KEYCHAIN_PROFILE" \
--wait

log_info "Stapling pkg"
xcrun stapler staple dist/*"$PRODUCT_VERSION"*.pkg
fi

log_success "**********************************"
log_success ""
log_success " The build finished successfully! "
Expand Down
12 changes: 10 additions & 2 deletions dist-assets/pkg-scripts/postinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,23 @@

set -eu

INSTALL_DIR=$2

# Workaround for issue in electron-builder where the pkg-scripts are run twice, once with the
# correct install dir and once with an incorrect one. This guard prevents running the script when
# called the second time. This can be reverted when the following issue has been fixed:
# https://github.com/electron-userland/electron-builder/issues/8166
if [[ $INSTALL_DIR == *"Mullvad VPN.app" ]]; then
exit 0
fi

LOG_DIR=/var/log/mullvad-vpn

mkdir -p $LOG_DIR
exec > $LOG_DIR/postinstall.log 2>&1

echo "Running postinstall at $(date)"

INSTALL_DIR=$2

# Run CLI to force macOS to check the certificate, and shut down the already running daemon, if one
# exists.
# This is a temporary workaround. After 2023.3, we switched from signing with Amagicom AB to
Expand Down
11 changes: 10 additions & 1 deletion dist-assets/pkg-scripts/preinstall
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,18 @@

set -eux

LOG_DIR=/var/log/mullvad-vpn
INSTALL_DIR=$2

# Workaround for issue in electron-builder where the pkg-scripts are run twice, once with the
# correct install dir and once with an incorrect one. This guard prevents running the script when
# called the second time. This can be reverted when the following issue has been fixed:
# https://github.com/electron-userland/electron-builder/issues/8166
if [[ $INSTALL_DIR == *"Mullvad VPN.app" ]]; then
exit 0
fi

LOG_DIR=/var/log/mullvad-vpn

mkdir -p $LOG_DIR
chmod 755 $LOG_DIR
exec > $LOG_DIR/preinstall.log 2>&1
Expand Down
Loading
Loading