Sync with upstream 2.1.x (releases 2.1.0 + 2.1.1) + review hardening - #6
Merged
Conversation
Added functions for managing game files location, including browsing and resetting to default.
Added functions to manage custom install location for the app's data directory.
Updated the installation process to clarify that no files will be moved during a fresh install. Added a warning message to inform users about the implications of changing the game files location.
Refactor relocation warning and user data handling for clarity and accuracy.
Added functionality to calculate total size of user data directories and check for free space before moving data.
Added functionality to display formatted file sizes and buttons to copy the path or open the folder. Enhanced user interface for managing game files location.
Updated folder selection to use zenity for a better user experience, with a fallback to tkinter if zenity is not available.
Updated comments for clarity and improved error handling for subprocess errors.
http_json() read GITHUB_TOKEN from the environment and attached it as an Authorization header to every request. It fetches both api.github.com (releases) and feedback.minecraft.net (game changelog), so a user or dev with GITHUB_TOKEN set leaked their GitHub credential to a non-GitHub host. These are public, read-only endpoints that need no credential, and the feature already degrades to its disk cache on error, so the token only ever raised GitHub's rate limit. Drop the ambient read entirely (least authority): no token, nothing to leak. Update the 403 hint to match, and add a regression test asserting no Authorization header is sent even when GITHUB_TOKEN is set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pmkUWS6teoMZUUnMJG7Gr
…-github-token Security: stop sending GITHUB_TOKEN to non-GitHub hosts
Clear BOL_HOME environment variable when resetting install location.
Updated the file browsing method to first attempt using Zenity for a modern GTK dialog, with a fallback to Tkinter's filedialog if Zenity is not available.
Removed unused variable 'loc_move_v' and commented out the 'files_to_move' list.
Refactor error handling for Zenity file selection. Added fallback to Tkinter for subprocess errors and improved user cancellation handling.
Refactor DATA resolution logic and improve comments.
Refactor data path resolution logic and improve comments.
Added relocation checks to prevent changes when BOL_HOME is set. Updated messages for relocation success and reset actions.
This file contains tests for the data directory relocation feature, including checks for default installation location, relocation allowance, and behavior when BOL_HOME is set.
Updated game_dir in settings to a relative path and added logic to recreate the content symlink if it exists. Improved error handling during user data relocation.
Added end-to-end migration and rollback test for user data.
This module handles the relocation of user data, including worlds, saves, and settings, to a new directory. It includes error handling and rollback mechanisms to ensure data integrity during the move.
Refactor data relocation logic to improve error handling and streamline the process of moving user data directories and files. Update the handling of existing data checks and ensure proper migration of data while maintaining user settings.
Refactor tests for data relocation feature, adding helper functions and new test cases for path overlap and migration rollback.
Fix profile root resolution when BOL_HOME points to a managed profile
Merge the validated native12 runtime, in-game fixes, packaging fixes and cumulative English release notes.
Download the pinned engine from its deterministic engine revision release so cached GitHub release listings cannot hide a newly published archive. Keep local portable overrides and transactional replacement intact, improve Flatpak recovery guidance, and cover stale metadata and failed downloads.
Adjust calculations for widget positioning and resizing to account for UI scaling.
Fix version picker when using 150%/200% UI scale
fix: avoid stale managed-engine release metadata
# Conflicts: # bol/config.py # bol/util.py
The stale-metadata test hardcoded Wyze3306/BedrockOnLinux in the expected download URL and cache filename, so it failed on any fork that repoints WINEGDK_PREBUILT_REPO. Derive the repo from the config constant the code itself uses, keeping the test correct on upstream and forks alike. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pmkUWS6teoMZUUnMJG7Gr
Defense-in-depth from the upstream 2.1.x security review: - config.py only honors an absolute path from the install_location pointer file; a relative pointer would otherwise resolve DATA (and the managed engine tree executed from it) against the current working directory. - deps.py re-pins six==1.17.0. python-xlib==0.33 requires six, and the hash-pinned closures (requirements-deb/appimage) already pin it, but the bare-host pip fallback dropped the explicit pin and would resolve it freely. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014pmkUWS6teoMZUUnMJG7Gr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Syncs the fork with
upstream/main(releases 2.1.0 + 2.1.1, ~92 commits) and carries the fork-posture divergence plus hardening from the security review.Security review
The full
main..upstream/maindelta was reviewed across five subsystems (integrity/engine, network/identity, filesystem/relocation, process/injection, GUI). Verdict: safe, integrity boundary strengthened. No new exploitable issue introduced; the incoming auth/prefix/build changes trend toward hardening (TLS verified everywhere, tokens0600, new source-manifest pin, per-patch SHA gating, symlink/containment guards). The only finding is a pre-existing unvalidated-xdg-open-on-changelog-links issue (tracked in #4), not introduced by this batch.Commits
upstream/main— conflicts resolved inconfig.py(took upstream's XDG/relocation logic + native12 engine pins, re-applied the fork'sWINEGDK_PREBUILT_REPO->CryptoFewkaand decoupledSELF_REPO->Wyze3306) andutil.py(took upstream's wording; the token-removal code is identical since Security: stop sending GITHUB_TOKEN to non-GitHub hosts Wyze3306/BedrockOnLinux#81 merged upstream).WINEGDK_PREBUILT_REPOinstead of hardcodingWyze3306, so the stale-metadata test passes on forks.config.pyonly honors an absoluteinstall_locationpointer path;deps.pyre-pins the transitivesix==1.17.0to match the hash-pinned closures.Fork posture preserved
481738ec…, newWINEGDK_SOURCE_MANIFEST_SHA256,WINEGDK_PREFIX_SHA256); the fork rebuilds the identical bytes and serves them from its own repo.WINEGDK_PREBUILT_REPO=CryptoFewka,SELF_REPO=Wyze3306(update notifications).Verification
python3 -m pytest -q: 479 passed, 2 skipped.ruff check --select F bol/ tests/: clean.The
pinsCI job will be red untilengine-wow64-archs-native12(SHA481738ec…) is published on this fork — that engine rebuild is the next operational step (it must reproduce upstream's bytes) and is also what the release consumes. The xcurl pin (504bb166…) is unchanged and already published.Written with Claude Code
🤖 Generated with Claude Code