Revision 0667633c
b/flowspec/forms.py | ||
---|---|---|
41 | 41 |
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) |
42 | 42 |
send_mail(settings.EMAIL_SUBJECT_PREFIX + "Caught an attempt to set a protected IP/network as a source address", |
43 | 43 |
mail_body, settings.SERVER_EMAIL, |
44 |
[settings.NOC_MAIL], fail_silently=True)
|
|
44 |
settings.NOTIFY_ADMIN_MAILS, fail_silently=True)
|
|
45 | 45 |
raise forms.ValidationError("Not allowed") |
46 | 46 |
if address.is_private: |
47 | 47 |
private_error = True |
... | ... | |
71 | 71 |
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) |
72 | 72 |
send_mail(settings.EMAIL_SUBJECT_PREFIX + "Caught an attempt to set a protected IP/network as the destination address", |
73 | 73 |
mail_body, settings.SERVER_EMAIL, |
74 |
[settings.NOC_MAIL], fail_silently=True)
|
|
74 |
settings.NOTIFY_ADMIN_MAILS, fail_silently=True)
|
|
75 | 75 |
raise forms.ValidationError("Not allowed") |
76 | 76 |
if address.prefixlen < settings.PREFIX_LENGTH: |
77 | 77 |
error = "Currently no prefix lengths < %s are allowed" %settings.PREFIX_LENGTH |
Also available in: Unified diff