This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steve.dower
Recipients matrixise, mdk, paul.moore, steve.dower, tim.golden, vstinner, zach.ware
Date 2019-02-19.17:05:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1550595900.62.0.0693052598991.issue36021@roundup.psfhosted.org>
In-reply-to
Content
The most I'd be okay with doing here is filtering for "<scheme>://" in the webbrowser module, and not limiting "scheme" at all except that it must be a valid scheme.

Windows allows apps and programs to extend protocol handling in HKEY_CLASSES_ROOT\PROTOCOLS\Handler and os.startfile() should respect this list, even while some browsers may handle more protocols that are not registered here. So there's really no way to limit the scheme sensibly.

And yeah, anyone can take an arbitrary local or remote path and rewrite it as "file://<computer>/<path>". That's a feature :)

Perhaps we should add a warning to the docs that by default, webbrowser will open a URL with the user's associated program, and while this is generally the desirable behavior, if you want to enforce a particular browser then you should .get() it first?
History
Date User Action Args
2019-02-19 17:05:00steve.dowersetrecipients: + steve.dower, paul.moore, vstinner, tim.golden, zach.ware, matrixise, mdk
2019-02-19 17:05:00steve.dowersetmessageid: <1550595900.62.0.0693052598991.issue36021@roundup.psfhosted.org>
2019-02-19 17:05:00steve.dowerlinkissue36021 messages
2019-02-19 17:05:00steve.dowercreate