-
Notifications
You must be signed in to change notification settings - Fork 0
feat(captcha): add automatic solver cascade (MAT-141) #182
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
6333fe0
feat(captcha): add automatic solver cascade (MAT-141)
mpiton 6e5b46a
fix(captcha): address MAT-141 review feedback
mpiton 7528096
ci: run Tesseract broker test on Windows
mpiton 19dc9c9
fix(captcha): harden solver review boundaries
mpiton 86c1af8
ci: require Windows Tesseract regression
mpiton 9b3d494
fix(captcha): close assisted window directly
mpiton 39d0e24
ci: fix Windows Tesseract fixture exit code
mpiton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "$schema": "https://schema.tauri.app/config/2", | ||
| "identifier": "captcha-browser", | ||
| "description": "Minimal capabilities for assisted CAPTCHA browser windows", | ||
| "windows": ["captcha-browser-*"], | ||
| "permissions": [ | ||
| "captcha-browser-commands", | ||
| "core:window:allow-close" | ||
| ] | ||
| } |
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| {"default":{"identifier":"default","description":"Default capabilities for Vortex","local":true,"windows":["main"],"permissions":["core:default","core:tray:default","notification:allow-notify","notification:allow-request-permission","notification:allow-is-permission-granted","dialog:allow-save","dialog:allow-open"]},"dev-pilot":{"identifier":"dev-pilot","description":"tauri-pilot testing plugin (Unix debug builds only)","local":true,"windows":["main"],"permissions":["pilot:default"],"platforms":["linux","macOS"]}} | ||
| {"captcha-browser":{"identifier":"captcha-browser","description":"Minimal capabilities for assisted CAPTCHA browser windows","local":true,"windows":["captcha-browser-*"],"permissions":["captcha-browser-commands","core:window:allow-close"]},"default":{"identifier":"default","description":"Default capabilities for Vortex","local":true,"windows":["main"],"permissions":["main-window-commands","core:default","core:tray:default","notification:allow-notify","notification:allow-request-permission","notification:allow-is-permission-granted","dialog:allow-save","dialog:allow-open"]},"dev-pilot":{"identifier":"dev-pilot","description":"tauri-pilot testing plugin (Unix debug builds only)","local":true,"windows":["main"],"permissions":["pilot:default"],"platforms":["linux","macOS"]}} |
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,107 @@ | ||
| [[permission]] | ||
| identifier = "main-window-commands" | ||
| description = "Allows the main window to invoke all Vortex application commands." | ||
| commands.allow = [ | ||
| "download_start", | ||
| "download_pause", | ||
| "download_resume", | ||
| "download_cancel", | ||
| "download_skip_wait", | ||
| "captcha_solve", | ||
| "captcha_skip", | ||
| "captcha_retry", | ||
| "captcha_list", | ||
| "captcha_get_pending", | ||
| "captcha_credential_status", | ||
| "captcha_credential_set", | ||
| "captcha_credential_delete", | ||
| "download_change_directory", | ||
| "download_change_directory_bulk", | ||
| "download_retry", | ||
| "download_redownload", | ||
| "download_verify_checksum", | ||
| "download_open_file", | ||
| "download_open_folder", | ||
| "download_pause_all", | ||
| "download_resume_all", | ||
| "download_set_priority", | ||
| "download_move_to_top", | ||
| "download_move_to_bottom", | ||
| "download_reorder_queue", | ||
| "download_remove", | ||
| "download_clear_completed", | ||
| "download_clear_failed", | ||
| "download_list", | ||
| "download_detail", | ||
| "download_logs", | ||
| "download_count_by_state", | ||
| "plugin_install", | ||
| "plugin_uninstall", | ||
| "plugin_enable", | ||
| "plugin_disable", | ||
| "plugin_list", | ||
| "plugin_store_list", | ||
| "plugin_store_refresh", | ||
| "plugin_store_install", | ||
| "plugin_store_update", | ||
| "plugin_config_get", | ||
| "plugin_config_update", | ||
| "plugin_report_broken", | ||
| "link_resolve", | ||
| "link_check_online", | ||
| "link_detect_duplicates", | ||
| "link_group_playlists", | ||
| "link_group_split_archives", | ||
| "link_import_container", | ||
| "clipboard_toggle", | ||
| "clipboard_state", | ||
| "settings_get", | ||
| "settings_update", | ||
| "status_bar_get", | ||
| "command_get_media_metadata", | ||
| "download_media_start", | ||
| "history_list", | ||
| "history_search", | ||
| "history_get_by_id", | ||
| "history_export", | ||
| "history_delete_entry", | ||
| "history_clear", | ||
| "history_purge_older_than", | ||
| "reveal_in_folder", | ||
| "stats_get", | ||
| "stats_top_modules", | ||
| "browse_folder", | ||
| "browse_file", | ||
| "account_add", | ||
| "account_update", | ||
| "account_delete", | ||
| "account_validate", | ||
| "account_export", | ||
| "account_import", | ||
| "account_list", | ||
| "account_get", | ||
| "account_traffic_get", | ||
| "package_create", | ||
| "package_update", | ||
| "package_delete", | ||
| "package_set_password", | ||
| "package_set_priority", | ||
| "package_move_to_folder", | ||
| "package_toggle_auto_extract", | ||
| "package_add_download", | ||
| "package_remove_download", | ||
| "package_list", | ||
| "package_get", | ||
| "package_list_downloads", | ||
| "package_find_by_external_id", | ||
| ] | ||
|
|
||
| [[permission]] | ||
| identifier = "captcha-browser-commands" | ||
| description = "Allows assisted CAPTCHA windows to read and resolve only their challenge." | ||
| commands.allow = [ | ||
| "captcha_get_pending", | ||
| "captcha_solve", | ||
| "captcha_skip", | ||
| "captcha_retry", | ||
| ] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| use sha2::{Digest, Sha256}; | ||
|
|
||
| const CAPTCHA_BROWSER_WINDOW_PREFIX: &str = "captcha-browser-"; | ||
|
|
||
| pub(crate) fn browser_window_label(challenge_id: &str) -> String { | ||
| let digest = Sha256::digest(challenge_id.as_bytes()); | ||
| format!("{CAPTCHA_BROWSER_WINDOW_PREFIX}{}", hex::encode(digest)) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.