diff options
author | Nikita Sobolev <mail@sobolevn.me> | 2023-12-28 18:58:06 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-28 18:58:06 (GMT) |
commit | fba324154e65b752e42aa59dea287d639935565f (patch) | |
tree | aa333070de12d71d62705cdab8019ab2f38e7e71 | |
parent | f108468970bf4e70910862476900f924fb701399 (diff) | |
download | cpython-fba324154e65b752e42aa59dea287d639935565f.zip cpython-fba324154e65b752e42aa59dea287d639935565f.tar.gz cpython-fba324154e65b752e42aa59dea287d639935565f.tar.bz2 |
gh-113543: Make sure that `MacOSXOSAScript` sends `webbrowser.open` audit event (#113544)
-rwxr-xr-x | Lib/webbrowser.py | 1 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/Lib/webbrowser.py b/Lib/webbrowser.py index 6f9c6a6..636e8ca 100755 --- a/Lib/webbrowser.py +++ b/Lib/webbrowser.py @@ -574,6 +574,7 @@ if sys.platform == 'darwin': super().__init__(name) def open(self, url, new=0, autoraise=True): + sys.audit("webbrowser.open", url) if self.name == 'default': script = 'open location "%s"' % url.replace('"', '%22') # opens in default browser else: diff --git a/Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst b/Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst new file mode 100644 index 0000000..5bf557b --- /dev/null +++ b/Misc/NEWS.d/next/Library/2023-12-28-14-36-20.gh-issue-113543.2iWkOR.rst @@ -0,0 +1,2 @@ +Make sure that ``webbrowser.MacOSXOSAScript`` sends ``webbrowser.open`` +audit event. |