Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
gh-108172: do not override OS preferred browser if it is a super-string of a known browser#113011
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
ghost commentedDec 12, 2023 • edited by ghost
Loading Uh oh!
There was an error while loading.Please reload this page.
edited by ghost
Uh oh!
There was an error while loading.Please reload this page.
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Pythonrequire a NEWS entry. Add one using theblurb_it web app or theblurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
356b5f5 toe1872ffCompareWhen checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox".
guss77 commentedMay 4, 2024
Ping! Any chance someone can review this 1 line fix? |
…r-string of a known browser (pythonGH-113011)When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox".python#108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open. We'll go with this for now.---------(cherry picked from commit10bf615)Co-authored-by: Oded Arbel <oded@geek.co.il>Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
GH-123527 is a backport of this pull request to the3.13 branch. |
…r-string of a known browser (pythonGH-113011)When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox".python#108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open. We'll go with this for now.---------(cherry picked from commit10bf615)Co-authored-by: Oded Arbel <oded@geek.co.il>Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
GH-123528 is a backport of this pull request to the3.12 branch. |
…er-string of a known browser (GH-113011) (GH-123528)gh-108172: do not override OS preferred browser if it is a super-string of a known browser (GH-113011)When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox".#108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open. We'll go with this for now.---------(cherry picked from commit10bf615)Co-authored-by: Oded Arbel <oded@geek.co.il>Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
guss77 commentedAug 31, 2024
Thanks for the backport! (I'm running 3.12 and this will be mighty useful to me). |
…er-string of a known browser (GH-113011) (#123527)gh-108172: do not override OS preferred browser if it is a super-string of a known browser (GH-113011)When checking if the registering browser is the "OS preferred browser", do not use a substring search - that makes no sense: one can have a preferred browser that looks like a super-string of a known browser, e.g. "firefox-nightly" vs "firefox".#108172 explains in more detail, and lays out a potential better future enhancement for this case of just using xdg-open. We'll go with this for now.---------(cherry picked from commit10bf615)Co-authored-by: Oded Arbel <oded@geek.co.il>Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Uh oh!
There was an error while loading.Please reload this page.
As discussed in issue#108172 , if one of the known browser is a substring match to the OS preferred browser (for example, if the preferred browser is
firefox-nightly.desktop),register_X_browserswill override the preferred browser with the wrong browser.The (more) correct way to see if the preferred browser is being registered is to compare its name to the expected FDo desktop entry name. This isn't very accurate, the linked issue details a possibly better idea, but this one works.
xdg-settings get default-web-browserresult #108172