diff --git a/ghunt/objects/apis.py b/ghunt/objects/apis.py index 170212bf..72cd0e55 100644 --- a/ghunt/objects/apis.py +++ b/ghunt/objects/apis.py @@ -74,12 +74,13 @@ def _load_endpoint(self, endpoint_name: str, for ext_type,ext_value in ext_metadata.items(): ext_bin_headers = {f"X-Goog-Ext-{k}-{ext_type.title()}":v for k,v in ext_value.items()} headers = {**headers, **ext_bin_headers} - + if not is_headers_syntax_good(headers): raise GHuntCorruptedHeadersError(f"The provided headers when loading the endpoint seems corrupted, please check it : {headers}") self.loaded_endpoints[endpoint_name] = EndpointConfig(headers, self.cookies) + async def _check_and_gen_authorization_token(self, as_client: httpx.AsyncClient, creds: GHuntCreds): async with self.gen_token_lock: present = False @@ -149,4 +150,4 @@ def recursive_merge(obj1, obj2, module_name: str) -> any: if not get_class_name(obj).startswith(class_name): raise GHuntObjectsMergingError("The two objects being merged aren't from the same class.") - self = recursive_merge(self, obj, module_name) \ No newline at end of file + self = recursive_merge(self, obj, module_name)