From 50b6f9a8f2b39545c7a09f3462445939034ca315 Mon Sep 17 00:00:00 2001 From: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com> Date: Sat, 8 Aug 2020 21:26:01 -0700 Subject: [PATCH] Blacklist password parameter in get_apikey command --- plexpy/api2.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plexpy/api2.py b/plexpy/api2.py index 4ee867d5..cb205ee5 100644 --- a/plexpy/api2.py +++ b/plexpy/api2.py @@ -715,12 +715,16 @@ General optional parameters: """ handles the stuff from the handler """ # Make sure the device ID is not shown in the logs - if self._api_cmd == 'register_device': + if kwargs.get('cmd') == 'register_device': if kwargs.get('device_id'): logger._BLACKLIST_WORDS.add(kwargs['device_id']) if kwargs.get('onesignal_id'): logger._BLACKLIST_WORDS.add(kwargs['onesignal_id']) + elif kwargs.get('cmd') == 'get_apikey': + if kwargs.get('password'): + logger._BLACKLIST_WORDS.add(kwargs['password']) + result = {} logger.api_debug('Tautulli APIv2 :: API called with kwargs: %s' % kwargs)