-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
356b5f5
to
e1872ff
Compare
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".
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 commit 10bf615) 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 the 3.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 commit 10bf615) 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 the 3.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 commit 10bf615) Co-authored-by: Oded Arbel <oded@geek.co.il> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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 commit 10bf615) Co-authored-by: Oded Arbel <oded@geek.co.il> Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
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_browsers
will 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-browser
result #108172