Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FoD
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
David Schmitz
FoD
Commits
c777928e
Commit
c777928e
authored
6 years ago
by
Tomáš Čejka
Browse files
Options
Downloads
Patches
Plain Diff
settings. add PERMIT_PRIVATE_IP_TARGETS to allow/forbid private IPs
parent
ab2d8a77
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
flowspec/validators.py
+4
-1
4 additions, 1 deletion
flowspec/validators.py
flowspy/settings.py.dist
+3
-0
3 additions, 0 deletions
flowspy/settings.py.dist
with
7 additions
and
1 deletion
flowspec/validators.py
+
4
−
1
View file @
c777928e
...
...
@@ -18,7 +18,10 @@ def get_network(ip):
def
clean_ip
(
address
):
if
False
and
address
.
is_private
:
if
not
hasattr
(
settings
,
"
PERMIT_PRIVATE_IP_TARGETS
"
):
settings
.
PERMIT_PRIVATE_IP_TARGETS
=
True
if
settings
.
PERMIT_PRIVATE_IP_TARGETS
==
False
and
address
.
is_private
:
return
_
(
'
Private addresses not allowed
'
)
if
address
.
version
==
4
and
int
(
address
.
prefixlen
)
==
32
:
...
...
This diff is collapsed.
Click to expand it.
flowspy/settings.py.dist
+
3
−
0
View file @
c777928e
...
...
@@ -393,6 +393,9 @@ SNMP_MAX_SAMPLECOUNT = 12
# Age of inactive routes that can be already removed (in seconds)
SNMP_REMOVE_RULES_AFTER = 3600
# If PERMIT_PRIVATE_IP_TARGETS is False, then users are not allowed to enter IP addresses from private IP ranges; it is True by default
PERMIT_PRIVATE_IP_TARGETS = True
##############################################################################
##############################################################################
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment