Repository navigation
Fix Authentication crash by migrating to Avalonia.Controls.WebView #887
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 10 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2f4792e
Initial plan
Copilot 0cb5476
Fix authentication crash by migrating to Avalonia.Controls.WebView
Copilot 61574c7
Explicitly disable WebView DevTools in auth dialog
Copilot 010056d
Filter auth cookies to those applicable to the YouTube home page domain
Copilot 3786075
Extract cookie domain-matching logic into a reusable IsApplicableFor …
Copilot f073408
Remove inaccurate trimming-incompatibility comment/root for Avalonia.…
Copilot 9bd7f28
Update AuthSetupView.axaml.cs
Tyrrrz 6c0aaf5
Simplify IsApplicableFor to an expression-bodied member while preserv…
Copilot 6e60c12
Explain why the leading dot is re-added rather than using cookie.Doma…
Copilot 36dd9df
Update CookieExtensions.cs
Tyrrrz 71d0e78
Fix login navigation cookie reset race
Copilot 6ccd4bf
Update AuthSetupView.axaml.cs
Tyrrrz 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| using System; | ||
| using System.Net; | ||
|
|
||
| namespace YoutubeDownloader.Utils.Extensions; | ||
|
|
||
| internal static class CookieExtensions | ||
| { | ||
| extension(Cookie cookie) | ||
| { | ||
| // Cookie domains may be scoped to a parent domain (e.g. ".youtube.com"), so check | ||
| // that the URI's host matches the cookie's domain exactly or as a subdomain. | ||
| public bool IsApplicableFor(Uri uri) => | ||
| string.Equals( | ||
| cookie.Domain.TrimStart('.'), | ||
| uri.Host, | ||
| StringComparison.OrdinalIgnoreCase | ||
| ) | ||
| || uri.Host.EndsWith( | ||
| // Ensure the domain starts with a dot | ||
| '.' + cookie.Domain.TrimStart('.'), | ||
| StringComparison.OrdinalIgnoreCase | ||
| ); | ||
| } | ||
| } | ||
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
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.