Fix CVE-2018-1281

References:
- https://nvd.nist.gov/vuln/detail/CVE-2018-1281
- https://bandit.readthedocs.io/en/latest/plugins/b104_hardcoded_bind_all_interfaces.html

```
Test results:
>> Issue: [B104:hardcoded_bind_all_interfaces] Possible binding to all interfaces.
   Severity: Medium   Confidence: Medium
   Location: ../local.py:4
   More Info: https://bandit.readthedocs.io/en/latest/plugins/b104_hardcoded_bind_all_interfaces.html
3	# https://docs.djangoproject.com/en/3.1/ref/settings/#allowed-hosts
4	ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"]
5
```
This commit is contained in:
Tonye Jack 2020-12-08 14:55:56 -05:00 committed by GitHub
parent 3b0b87e4cb
commit 242f50c038
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -11,7 +11,7 @@ SECRET_KEY = env(
default="!!!SET DJANGO_SECRET_KEY!!!",
)
# https://docs.djangoproject.com/en/dev/ref/settings/#allowed-hosts
ALLOWED_HOSTS = ["localhost", "0.0.0.0", "127.0.0.1"]
ALLOWED_HOSTS = ["localhost", "127.0.0.1"]
# CACHES
# ------------------------------------------------------------------------------