diff --git a/rhodecode/apps/login/views.py b/rhodecode/apps/login/views.py --- a/rhodecode/apps/login/views.py +++ b/rhodecode/apps/login/views.py @@ -133,7 +133,7 @@ class LoginView(BaseAppView): 'response': captcha_rs, 'remoteip': get_ip_addr(self.request.environ) } - verify_rs = requests.get(url, params=params, verify=True) + verify_rs = requests.get(url, params=params, verify=True, timeout=60) verify_rs = verify_rs.json() captcha_status = verify_rs.get('success', False) captcha_errors = verify_rs.get('error-codes', []) diff --git a/rhodecode/integrations/types/hipchat.py b/rhodecode/integrations/types/hipchat.py --- a/rhodecode/integrations/types/hipchat.py +++ b/rhodecode/integrations/types/hipchat.py @@ -243,9 +243,11 @@ class HipchatIntegrationType(Integration @async_task(ignore_result=True, base=RequestContextTask) def post_text_to_hipchat(settings, text): log.debug('sending %s to hipchat %s' % (text, settings['server_url'])) - resp = requests.post(settings['server_url'], json={ + json_message = { "message": text, "color": settings.get('color', 'yellow'), "notify": settings.get('notify', False), - }) + } + + resp = requests.post(settings['server_url'], json=json_message, timeout=60) resp.raise_for_status() # raise exception on a failed request diff --git a/rhodecode/integrations/types/slack.py b/rhodecode/integrations/types/slack.py --- a/rhodecode/integrations/types/slack.py +++ b/rhodecode/integrations/types/slack.py @@ -346,5 +346,5 @@ def post_text_to_slack(settings, title, "attachments": [message_data] } - resp = requests.post(settings['service'], json=json_message) + resp = requests.post(settings['service'], json=json_message, timeout=60) resp.raise_for_status() # raise exception on a failed request diff --git a/rhodecode/integrations/types/webhook.py b/rhodecode/integrations/types/webhook.py --- a/rhodecode/integrations/types/webhook.py +++ b/rhodecode/integrations/types/webhook.py @@ -264,7 +264,7 @@ def post_to_webhook(url_calls, settings) resp = call_method(url, json={ 'token': token, 'event': data - }, headers=call_headers, auth=auth) + }, headers=call_headers, auth=auth, timeout=60) log.debug('Got Webhook response: %s', resp) try: