Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mailinabox
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mailinabox
Commits
bf5e9200
Commit
bf5e9200
authored
Jun 26, 2016
by
Michael Kroes
Committed by
Joshua Tauberer
Jun 27, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update owncloud url to use webdav and increase http timeout
parent
01fa8cf7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
fail2ban.py
tests/fail2ban.py
+2
-2
No files found.
tests/fail2ban.py
View file @
bf5e9200
...
@@ -85,7 +85,7 @@ def http_test(url, expected_status, postdata=None, qsargs=None, auth=None):
...
@@ -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__":
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment