mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2025-04-21 03:02:09 +00:00
Fix fail2ban tests for owncloud 9
This commit is contained in:
parent
294f13c630
commit
c5f7af811a
@ -10,11 +10,12 @@ import sys, os, time, functools
|
||||
|
||||
# parse command line
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print("Usage: tests/fail2ban.py user@hostname")
|
||||
if len(sys.argv) < 3:
|
||||
print("Usage: tests/fail2ban.py user@hostname owncloud_user")
|
||||
sys.exit(1)
|
||||
|
||||
ssh_user, hostname = sys.argv[1].split("@", 1)
|
||||
owncloud_user = sys.argv[2]
|
||||
|
||||
# define some test types
|
||||
|
||||
@ -189,7 +190,7 @@ if __name__ == "__main__":
|
||||
run_test(http_test, ["/admin/munin/", 401], 20, 30, 1)
|
||||
|
||||
# ownCloud
|
||||
run_test(http_test, ["/cloud/remote.php/webdav", 401, None, None, ["aa", "aa"]], 20, 120, 1)
|
||||
run_test(http_test, ["/cloud/remote.php/webdav", 401, None, None, [owncloud_user, "aa"]], 20, 120, 1)
|
||||
|
||||
# restart fail2ban so that this client machine is no longer blocked
|
||||
restart_fail2ban_service(final=True)
|
||||
|
Loading…
Reference in New Issue
Block a user