Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
flowspy
Commits
0667633c
Commit
0667633c
authored
Jan 20, 2012
by
Leonidas Poulopoulos
Browse files
Fixed issue with missing mail address list from abuse notification
parent
083c9706
Changes
1
Show whitespace changes
Inline
Side-by-side
flowspec/forms.py
View file @
0667633c
...
@@ -41,7 +41,7 @@ class RouteForm(forms.ModelForm):
...
@@ -41,7 +41,7 @@ class RouteForm(forms.ModelForm):
mail_body
=
"User %s %s (%s) attempted to set %s as the source address in a firewall rule"
%
(
user
.
username
,
user
.
email
,
peer
.
peer_name
,
data
)
mail_body
=
"User %s %s (%s) attempted to set %s as the source address in a firewall rule"
%
(
user
.
username
,
user
.
email
,
peer
.
peer_name
,
data
)
send_mail
(
settings
.
EMAIL_SUBJECT_PREFIX
+
"Caught an attempt to set a protected IP/network as a source address"
,
send_mail
(
settings
.
EMAIL_SUBJECT_PREFIX
+
"Caught an attempt to set a protected IP/network as a source address"
,
mail_body
,
settings
.
SERVER_EMAIL
,
mail_body
,
settings
.
SERVER_EMAIL
,
[
settings
.
NO
C
_MAIL
]
,
fail_silently
=
True
)
settings
.
NO
TIFY_ADMIN
_MAIL
S
,
fail_silently
=
True
)
raise
forms
.
ValidationError
(
"Not allowed"
)
raise
forms
.
ValidationError
(
"Not allowed"
)
if
address
.
is_private
:
if
address
.
is_private
:
private_error
=
True
private_error
=
True
...
@@ -71,7 +71,7 @@ class RouteForm(forms.ModelForm):
...
@@ -71,7 +71,7 @@ class RouteForm(forms.ModelForm):
mail_body
=
"User %s %s (%s) attempted to set %s as the destination address in a firewall rule"
%
(
user
.
username
,
user
.
email
,
peer
.
peer_name
,
data
)
mail_body
=
"User %s %s (%s) attempted to set %s as the destination address in a firewall rule"
%
(
user
.
username
,
user
.
email
,
peer
.
peer_name
,
data
)
send_mail
(
settings
.
EMAIL_SUBJECT_PREFIX
+
"Caught an attempt to set a protected IP/network as the destination address"
,
send_mail
(
settings
.
EMAIL_SUBJECT_PREFIX
+
"Caught an attempt to set a protected IP/network as the destination address"
,
mail_body
,
settings
.
SERVER_EMAIL
,
mail_body
,
settings
.
SERVER_EMAIL
,
[
settings
.
NO
C
_MAIL
]
,
fail_silently
=
True
)
settings
.
NO
TIFY_ADMIN
_MAIL
S
,
fail_silently
=
True
)
raise
forms
.
ValidationError
(
"Not allowed"
)
raise
forms
.
ValidationError
(
"Not allowed"
)
if
address
.
prefixlen
<
settings
.
PREFIX_LENGTH
:
if
address
.
prefixlen
<
settings
.
PREFIX_LENGTH
:
error
=
"Currently no prefix lengths < %s are allowed"
%
settings
.
PREFIX_LENGTH
error
=
"Currently no prefix lengths < %s are allowed"
%
settings
.
PREFIX_LENGTH
...
...
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