mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-22 02:17:26 +00:00
Update owncloud url to use webdav and increase http timeout
This commit is contained in:
parent
01fa8cf72c
commit
bf5e9200f8
@ -85,7 +85,7 @@ def http_test(url, expected_status, postdata=None, qsargs=None, auth=None):
|
|||||||
auth=HTTPBasicAuth(*auth) if auth else None,
|
auth=HTTPBasicAuth(*auth) if auth else None,
|
||||||
data=postdata,
|
data=postdata,
|
||||||
headers={'User-Agent': 'Mail-in-a-Box fail2ban tester'},
|
headers={'User-Agent': 'Mail-in-a-Box fail2ban tester'},
|
||||||
timeout=4)
|
timeout=8)
|
||||||
except requests.exceptions.ConnectionError as e:
|
except requests.exceptions.ConnectionError as e:
|
||||||
if "Connection refused" in str(e):
|
if "Connection refused" in str(e):
|
||||||
raise IsBlocked()
|
raise IsBlocked()
|
||||||
@ -187,7 +187,7 @@ if __name__ == "__main__":
|
|||||||
run_test(http_test, ["/admin/munin/", 401], 20, 30, 1)
|
run_test(http_test, ["/admin/munin/", 401], 20, 30, 1)
|
||||||
|
|
||||||
# ownCloud
|
# ownCloud
|
||||||
run_test(http_test, ["/cloud/remote.php/caldav/calendars/user@domain/personal", 401], 20, 30, 1)
|
run_test(http_test, ["/cloud/remote.php/webdav", 401, None, None, ["aa", "aa"]], 20, 30, 1)
|
||||||
|
|
||||||
# restart fail2ban so that this client machine is no longer blocked
|
# restart fail2ban so that this client machine is no longer blocked
|
||||||
restart_fail2ban_service(final=True)
|
restart_fail2ban_service(final=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user