From 5226a9173ab00fc50f4f5b7d49dbfff491447f22 Mon Sep 17 00:00:00 2001 From: daniel Date: Wed, 8 May 2024 16:32:56 -0400 Subject: [PATCH] force api key to be a string --- _template_/provider/app.py | 2 +- agilitycms/provider/app.py | 2 +- agora/provider/app.py | 2 +- aha/provider/app.py | 2 +- algolia/provider/app.py | 2 +- asana/provider/app.py | 2 +- atera/provider/app.py | 2 +- backstage/provider/app.py | 2 +- basecamp/provider/app.py | 2 +- bigquery/provider/app.py | 2 +- blogger/provider/app.py | 2 +- box/provider/app.py | 2 +- carbon/provider/app.py | 2 +- cockroach/provider/app.py | 2 +- coda/provider/app.py | 2 +- confluence/provider/app.py | 2 +- contentful/provider/app.py | 2 +- copper/provider/app.py | 2 +- couchbase/provider/app.py | 2 +- courier/provider/app.py | 2 +- crunchbase/provider/app.py | 2 +- discourse/provider/app.py | 2 +- docusign/provider/app.py | 2 +- dropbox/provider/app.py | 2 +- egnyte/provider/app.py | 2 +- elastic/provider/app.py | 2 +- fifteenfive/provider/app.py | 2 +- fireflies/provider/app.py | 2 +- freshdesk/provider/app.py | 2 +- freshsales/provider/app.py | 2 +- freshservice/provider/app.py | 2 +- gcalendar/provider/app.py | 2 +- gdrive/provider/app.py | 2 +- github/provider/app.py | 2 +- gitlab/provider/app.py | 2 +- gmail/provider/app.py | 2 +- guru/provider/app.py | 2 +- hackernews/provider/app.py | 2 +- helpscout/provider/app.py | 2 +- hubspot/provider/app.py | 2 +- intercom/provider/app.py | 2 +- jenkins/provider/app.py | 2 +- jira/provider/app.py | 2 +- kendra/provider/app.py | 2 +- klaviyo/provider/app.py | 2 +- knowledgeowl/provider/app.py | 2 +- linear/provider/app.py | 2 +- medium/provider/app.py | 2 +- milvus/provider/app.py | 2 +- miro/provider/app.py | 2 +- mongodb/provider/app.py | 2 +- msteams/provider/app.py | 2 +- mysql/provider/app.py | 2 +- notion/provider/app.py | 2 +- opensearch/provider/app.py | 2 +- opsgenie/provider/app.py | 2 +- outlook/provider/app.py | 2 +- pagerduty/provider/app.py | 2 +- pinecone/provider/app.py | 2 +- postgres/provider/app.py | 2 +- qdrant/provider/app.py | 2 +- readme/provider/app.py | 2 +- redis/provider/app.py | 2 +- redshift/provider/app.py | 2 +- reuters/provider/app.py | 2 +- servicenow/provider/app.py | 2 +- sharepoint/provider/app.py | 2 +- shortcut/provider/app.py | 2 +- skilljar/provider/app.py | 2 +- slack/provider/app.py | 2 +- slack/provider/client.py | 2 +- smartsheet/provider/app.py | 2 +- snowflake/provider/app.py | 2 +- solr/provider/app.py | 2 +- stackoverflow/provider/app.py | 2 +- techcrunch/provider/app.py | 2 +- trello/provider/app.py | 2 +- vectara/provider/app.py | 2 +- vespa/provider/app.py | 2 +- weaviate/provider/app.py | 2 +- wikipedia/provider/app.py | 2 +- wordpress/provider/app.py | 2 +- yammer/provider/app.py | 2 +- yext/provider/app.py | 2 +- youtrack/provider/app.py | 2 +- zendesk/provider/app.py | 2 +- zulip/provider/app.py | 2 +- 87 files changed, 87 insertions(+), 87 deletions(-) diff --git a/_template_/provider/app.py b/_template_/provider/app.py index 9d2b4a9a5..aa2ebab66 100644 --- a/_template_/provider/app.py +++ b/_template_/provider/app.py @@ -26,7 +26,7 @@ def search(body): # This function is run for all endpoints to ensure requests are using a valid API key def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/agilitycms/provider/app.py b/agilitycms/provider/app.py index b44c8f445..ae9be8511 100644 --- a/agilitycms/provider/app.py +++ b/agilitycms/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/agora/provider/app.py b/agora/provider/app.py index a14dbdd96..7c644c1b5 100644 --- a/agora/provider/app.py +++ b/agora/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/aha/provider/app.py b/aha/provider/app.py index d3a0bd160..a1405cffa 100644 --- a/aha/provider/app.py +++ b/aha/provider/app.py @@ -25,7 +25,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/algolia/provider/app.py b/algolia/provider/app.py index 9c141f076..4066b61d6 100644 --- a/algolia/provider/app.py +++ b/algolia/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/asana/provider/app.py b/asana/provider/app.py index cd82df346..83db9825e 100644 --- a/asana/provider/app.py +++ b/asana/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/atera/provider/app.py b/atera/provider/app.py index 61cf11ff5..c9043efd3 100644 --- a/atera/provider/app.py +++ b/atera/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() return {} diff --git a/backstage/provider/app.py b/backstage/provider/app.py index 8e2b4e5be..f085ea577 100644 --- a/backstage/provider/app.py +++ b/backstage/provider/app.py @@ -24,7 +24,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/basecamp/provider/app.py b/basecamp/provider/app.py index 6c4e1c7c7..3d6c35c6a 100644 --- a/basecamp/provider/app.py +++ b/basecamp/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/bigquery/provider/app.py b/bigquery/provider/app.py index 9c141f076..4066b61d6 100644 --- a/bigquery/provider/app.py +++ b/bigquery/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/blogger/provider/app.py b/blogger/provider/app.py index 75a78ed95..8acb1e6e9 100644 --- a/blogger/provider/app.py +++ b/blogger/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/box/provider/app.py b/box/provider/app.py index 7f031d179..af6cb348f 100644 --- a/box/provider/app.py +++ b/box/provider/app.py @@ -21,7 +21,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/carbon/provider/app.py b/carbon/provider/app.py index 8d27916d2..a78eea845 100644 --- a/carbon/provider/app.py +++ b/carbon/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/cockroach/provider/app.py b/cockroach/provider/app.py index 31056e650..6ab1b6b6f 100644 --- a/cockroach/provider/app.py +++ b/cockroach/provider/app.py @@ -24,7 +24,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/coda/provider/app.py b/coda/provider/app.py index 9c141f076..4066b61d6 100644 --- a/coda/provider/app.py +++ b/coda/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/confluence/provider/app.py b/confluence/provider/app.py index 94eb802b3..05a4bb660 100644 --- a/confluence/provider/app.py +++ b/confluence/provider/app.py @@ -23,7 +23,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/contentful/provider/app.py b/contentful/provider/app.py index 357303489..ec2bdacfd 100644 --- a/contentful/provider/app.py +++ b/contentful/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/copper/provider/app.py b/copper/provider/app.py index 1c1fd784e..c7dd712c2 100644 --- a/copper/provider/app.py +++ b/copper/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/couchbase/provider/app.py b/couchbase/provider/app.py index e79dbcfc0..456611afb 100644 --- a/couchbase/provider/app.py +++ b/couchbase/provider/app.py @@ -23,7 +23,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/courier/provider/app.py b/courier/provider/app.py index 8d27916d2..a78eea845 100644 --- a/courier/provider/app.py +++ b/courier/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/crunchbase/provider/app.py b/crunchbase/provider/app.py index eca9a35be..6372ba144 100644 --- a/crunchbase/provider/app.py +++ b/crunchbase/provider/app.py @@ -25,7 +25,7 @@ def search(body): # This function is run for all endpoints to ensure requests are using a valid API key def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/discourse/provider/app.py b/discourse/provider/app.py index 4e04c4856..333257229 100644 --- a/discourse/provider/app.py +++ b/discourse/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/docusign/provider/app.py b/docusign/provider/app.py index 327633070..69509c981 100644 --- a/docusign/provider/app.py +++ b/docusign/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/dropbox/provider/app.py b/dropbox/provider/app.py index 0bb6e4769..fdf6463db 100644 --- a/dropbox/provider/app.py +++ b/dropbox/provider/app.py @@ -28,7 +28,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/egnyte/provider/app.py b/egnyte/provider/app.py index 9c141f076..4066b61d6 100644 --- a/egnyte/provider/app.py +++ b/egnyte/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/elastic/provider/app.py b/elastic/provider/app.py index e2824472c..2d6797b6e 100644 --- a/elastic/provider/app.py +++ b/elastic/provider/app.py @@ -21,7 +21,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() return {} diff --git a/fifteenfive/provider/app.py b/fifteenfive/provider/app.py index f2e153b2e..5033cd0e7 100644 --- a/fifteenfive/provider/app.py +++ b/fifteenfive/provider/app.py @@ -23,7 +23,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/fireflies/provider/app.py b/fireflies/provider/app.py index 705bbbe25..ff7d50b20 100644 --- a/fireflies/provider/app.py +++ b/fireflies/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/freshdesk/provider/app.py b/freshdesk/provider/app.py index 9c141f076..4066b61d6 100644 --- a/freshdesk/provider/app.py +++ b/freshdesk/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/freshsales/provider/app.py b/freshsales/provider/app.py index 9c141f076..4066b61d6 100644 --- a/freshsales/provider/app.py +++ b/freshsales/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/freshservice/provider/app.py b/freshservice/provider/app.py index 8d27916d2..a78eea845 100644 --- a/freshservice/provider/app.py +++ b/freshservice/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/gcalendar/provider/app.py b/gcalendar/provider/app.py index 8d27916d2..a78eea845 100644 --- a/gcalendar/provider/app.py +++ b/gcalendar/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/gdrive/provider/app.py b/gdrive/provider/app.py index e1b8ff6d1..21bbcfc88 100644 --- a/gdrive/provider/app.py +++ b/gdrive/provider/app.py @@ -31,7 +31,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/github/provider/app.py b/github/provider/app.py index 61cf11ff5..c9043efd3 100644 --- a/github/provider/app.py +++ b/github/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() return {} diff --git a/gitlab/provider/app.py b/gitlab/provider/app.py index 9c141f076..4066b61d6 100644 --- a/gitlab/provider/app.py +++ b/gitlab/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/gmail/provider/app.py b/gmail/provider/app.py index 924541c09..10c4d53c0 100644 --- a/gmail/provider/app.py +++ b/gmail/provider/app.py @@ -21,7 +21,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/guru/provider/app.py b/guru/provider/app.py index 4e04c4856..333257229 100644 --- a/guru/provider/app.py +++ b/guru/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/hackernews/provider/app.py b/hackernews/provider/app.py index e119e0056..1b164fc90 100644 --- a/hackernews/provider/app.py +++ b/hackernews/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/helpscout/provider/app.py b/helpscout/provider/app.py index 4a49527fe..a40178476 100644 --- a/helpscout/provider/app.py +++ b/helpscout/provider/app.py @@ -21,7 +21,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/hubspot/provider/app.py b/hubspot/provider/app.py index eb8664233..e09030374 100644 --- a/hubspot/provider/app.py +++ b/hubspot/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/intercom/provider/app.py b/intercom/provider/app.py index 61cf11ff5..c9043efd3 100644 --- a/intercom/provider/app.py +++ b/intercom/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() return {} diff --git a/jenkins/provider/app.py b/jenkins/provider/app.py index 8e2b4e5be..f085ea577 100644 --- a/jenkins/provider/app.py +++ b/jenkins/provider/app.py @@ -24,7 +24,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/jira/provider/app.py b/jira/provider/app.py index 3e992108a..58b3435a5 100644 --- a/jira/provider/app.py +++ b/jira/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/kendra/provider/app.py b/kendra/provider/app.py index 9c141f076..4066b61d6 100644 --- a/kendra/provider/app.py +++ b/kendra/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/klaviyo/provider/app.py b/klaviyo/provider/app.py index e9677cace..ac6c17b96 100644 --- a/klaviyo/provider/app.py +++ b/klaviyo/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/knowledgeowl/provider/app.py b/knowledgeowl/provider/app.py index 8d27916d2..a78eea845 100644 --- a/knowledgeowl/provider/app.py +++ b/knowledgeowl/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/linear/provider/app.py b/linear/provider/app.py index 48f2c1827..a126618f1 100644 --- a/linear/provider/app.py +++ b/linear/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/medium/provider/app.py b/medium/provider/app.py index 477555a9a..ceac4f4cf 100644 --- a/medium/provider/app.py +++ b/medium/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/milvus/provider/app.py b/milvus/provider/app.py index 4e04c4856..333257229 100644 --- a/milvus/provider/app.py +++ b/milvus/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/miro/provider/app.py b/miro/provider/app.py index cd82df346..83db9825e 100644 --- a/miro/provider/app.py +++ b/miro/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/mongodb/provider/app.py b/mongodb/provider/app.py index 8d27916d2..a78eea845 100644 --- a/mongodb/provider/app.py +++ b/mongodb/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/msteams/provider/app.py b/msteams/provider/app.py index e5b431411..5bcb93cd9 100644 --- a/msteams/provider/app.py +++ b/msteams/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/mysql/provider/app.py b/mysql/provider/app.py index e3350e790..ffd88244e 100644 --- a/mysql/provider/app.py +++ b/mysql/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/notion/provider/app.py b/notion/provider/app.py index 8d27916d2..a78eea845 100644 --- a/notion/provider/app.py +++ b/notion/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/opensearch/provider/app.py b/opensearch/provider/app.py index d8674c69c..aa563d8e3 100644 --- a/opensearch/provider/app.py +++ b/opensearch/provider/app.py @@ -28,7 +28,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/opsgenie/provider/app.py b/opsgenie/provider/app.py index 93b57534a..fe0c22360 100644 --- a/opsgenie/provider/app.py +++ b/opsgenie/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/outlook/provider/app.py b/outlook/provider/app.py index e5b431411..5bcb93cd9 100644 --- a/outlook/provider/app.py +++ b/outlook/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/pagerduty/provider/app.py b/pagerduty/provider/app.py index ea21b28d3..5e0587138 100644 --- a/pagerduty/provider/app.py +++ b/pagerduty/provider/app.py @@ -28,7 +28,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/pinecone/provider/app.py b/pinecone/provider/app.py index 327e55ff2..bf6cbb4bd 100644 --- a/pinecone/provider/app.py +++ b/pinecone/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/postgres/provider/app.py b/postgres/provider/app.py index 4e04c4856..333257229 100644 --- a/postgres/provider/app.py +++ b/postgres/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/qdrant/provider/app.py b/qdrant/provider/app.py index 4e04c4856..333257229 100644 --- a/qdrant/provider/app.py +++ b/qdrant/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/readme/provider/app.py b/readme/provider/app.py index 9c141f076..4066b61d6 100644 --- a/readme/provider/app.py +++ b/readme/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/redis/provider/app.py b/redis/provider/app.py index 61cf11ff5..c9043efd3 100644 --- a/redis/provider/app.py +++ b/redis/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() return {} diff --git a/redshift/provider/app.py b/redshift/provider/app.py index ea21b28d3..5e0587138 100644 --- a/redshift/provider/app.py +++ b/redshift/provider/app.py @@ -28,7 +28,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/reuters/provider/app.py b/reuters/provider/app.py index fe4d9d907..188329137 100644 --- a/reuters/provider/app.py +++ b/reuters/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/servicenow/provider/app.py b/servicenow/provider/app.py index 4753404c7..2871b0281 100644 --- a/servicenow/provider/app.py +++ b/servicenow/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/sharepoint/provider/app.py b/sharepoint/provider/app.py index e5b431411..5bcb93cd9 100644 --- a/sharepoint/provider/app.py +++ b/sharepoint/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/shortcut/provider/app.py b/shortcut/provider/app.py index 61cf11ff5..c9043efd3 100644 --- a/shortcut/provider/app.py +++ b/shortcut/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() return {} diff --git a/skilljar/provider/app.py b/skilljar/provider/app.py index e2ec6cc6d..81f9fabbb 100644 --- a/skilljar/provider/app.py +++ b/skilljar/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/slack/provider/app.py b/slack/provider/app.py index 5992a321c..c56c405d2 100644 --- a/slack/provider/app.py +++ b/slack/provider/app.py @@ -23,7 +23,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/slack/provider/client.py b/slack/provider/client.py index 20594971a..ca1b7cee6 100644 --- a/slack/provider/client.py +++ b/slack/provider/client.py @@ -19,7 +19,7 @@ def search_all(self, query): def get_client(): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) api_token = None if api_key == "": api_token = get_access_token() diff --git a/smartsheet/provider/app.py b/smartsheet/provider/app.py index 755832941..5ecb58219 100644 --- a/smartsheet/provider/app.py +++ b/smartsheet/provider/app.py @@ -21,7 +21,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/snowflake/provider/app.py b/snowflake/provider/app.py index c3442adee..c45009a16 100644 --- a/snowflake/provider/app.py +++ b/snowflake/provider/app.py @@ -23,7 +23,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/solr/provider/app.py b/solr/provider/app.py index 8e2b4e5be..f085ea577 100644 --- a/solr/provider/app.py +++ b/solr/provider/app.py @@ -24,7 +24,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/stackoverflow/provider/app.py b/stackoverflow/provider/app.py index 6bf8f9846..b369f12ae 100644 --- a/stackoverflow/provider/app.py +++ b/stackoverflow/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/techcrunch/provider/app.py b/techcrunch/provider/app.py index d89626e5d..005e387ad 100644 --- a/techcrunch/provider/app.py +++ b/techcrunch/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/trello/provider/app.py b/trello/provider/app.py index 9c141f076..4066b61d6 100644 --- a/trello/provider/app.py +++ b/trello/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/vectara/provider/app.py b/vectara/provider/app.py index 1918241f7..b85ac3d4e 100644 --- a/vectara/provider/app.py +++ b/vectara/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != str(app.config.get("CONNECTOR_API_KEY")): + if token != str(str(app.config.get("CONNECTOR_API_KEY"))): raise Unauthorized() # successfully authenticated return {} diff --git a/vespa/provider/app.py b/vespa/provider/app.py index 755d90ec8..eeda3788e 100644 --- a/vespa/provider/app.py +++ b/vespa/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/weaviate/provider/app.py b/weaviate/provider/app.py index 8167b76a9..194395226 100644 --- a/weaviate/provider/app.py +++ b/weaviate/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/wikipedia/provider/app.py b/wikipedia/provider/app.py index fe4d9d907..188329137 100644 --- a/wikipedia/provider/app.py +++ b/wikipedia/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/wordpress/provider/app.py b/wordpress/provider/app.py index 4e04c4856..333257229 100644 --- a/wordpress/provider/app.py +++ b/wordpress/provider/app.py @@ -22,7 +22,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/yammer/provider/app.py b/yammer/provider/app.py index 376bc54ec..b39dbdaa9 100644 --- a/yammer/provider/app.py +++ b/yammer/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/yext/provider/app.py b/yext/provider/app.py index 717767540..3dbebf746 100644 --- a/yext/provider/app.py +++ b/yext/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() # successfully authenticated diff --git a/youtrack/provider/app.py b/youtrack/provider/app.py index 61598714c..c88c67e80 100644 --- a/youtrack/provider/app.py +++ b/youtrack/provider/app.py @@ -19,7 +19,7 @@ def search(body): def apikey_auth(token): - api_key = app.config.get("CONNECTOR_API_KEY", "") + api_key = str(app.config.get("CONNECTOR_API_KEY", "")) if api_key != "" and token != api_key: raise Unauthorized() diff --git a/zendesk/provider/app.py b/zendesk/provider/app.py index cf56a1716..16da53b3a 100644 --- a/zendesk/provider/app.py +++ b/zendesk/provider/app.py @@ -26,7 +26,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {} diff --git a/zulip/provider/app.py b/zulip/provider/app.py index 9c141f076..4066b61d6 100644 --- a/zulip/provider/app.py +++ b/zulip/provider/app.py @@ -18,7 +18,7 @@ def search(body): def apikey_auth(token): - if token != app.config.get("CONNECTOR_API_KEY"): + if token != str(app.config.get("CONNECTOR_API_KEY")): raise Unauthorized() # successfully authenticated return {}