Enhanced self.APP_KEY and self.APP_SECRET grabbing. (#233)

* added function getSettingStringStripped to utils and implemented in authorizers.py dropbox  flow line 47

* added function getSettingStringStripped to utils and implemented in authorizers.py dropbox  flow line 47
This commit is contained in:
rjclark99 2024-04-28 16:09:59 +01:00 committed by GitHub
parent ca10bf7307
commit a32e6f2656
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 2 deletions

View File

@ -44,8 +44,8 @@ class DropboxAuthorizer:
APP_SECRET = "" APP_SECRET = ""
def __init__(self): def __init__(self):
self.APP_KEY = utils.getSetting('dropbox_key') self.APP_KEY = utils.getSettingStringStripped('dropbox_key')
self.APP_SECRET = utils.getSetting('dropbox_secret') self.APP_SECRET = utils.getSettingStringStripped('dropbox_secret')
def setup(self): def setup(self):
result = True result = True

View File

@ -30,6 +30,8 @@ def showNotification(message):
def getSetting(name): def getSetting(name):
return __Addon.getSetting(name) return __Addon.getSetting(name)
def getSettingStringStripped(name):
return __Addon.getSettingString(name).strip()
def getSettingBool(name): def getSettingBool(name):
return bool(__Addon.getSettingBool(name)) return bool(__Addon.getSettingBool(name))