gh-113543: Make sure that MacOSXOSAScript sends webbrowser.open audit event (#113544)

This commit is contained in:
Nikita Sobolev 2023-12-28 21:58:06 +03:00 committed by GitHub
parent f108468970
commit fba324154e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -574,6 +574,7 @@ def __init__(self, name='default'):
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:

View file

@ -0,0 +1,2 @@
Make sure that ``webbrowser.MacOSXOSAScript`` sends ``webbrowser.open``
audit event.