Skip to content

Commit 09c1834

Browse files
authored
Merge pull request #54 from dimagi/dmr/fix-django-range
Update django range to exclude vulnerable versions
2 parents 542e9be + 0839723 commit 09c1834

File tree

4 files changed

+27
-12
lines changed

4 files changed

+27
-12
lines changed

.travis.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
11
language: python
22
python:
3-
- "2.7"
43
- "3.4"
54
- "3.5"
65
- "3.6"
76
env:
8-
- DJANGO_VERSION_MIN=1.8 DJANGO_VERSION_MAX=1.9
9-
- DJANGO_VERSION_MIN=1.9 DJANGO_VERSION_MAX=1.10
10-
- DJANGO_VERSION_MIN=1.10 DJANGO_VERSION_MAX=1.11
117
- DJANGO_VERSION_MIN=1.11 DJANGO_VERSION_MAX=2.0
12-
- DJANGO_VERSION_MIN=2.0 DJANGO_VERSION_MAX=2.1
8+
- DJANGO_VERSION_MIN=2.2 DJANGO_VERSION_MAX=2.3
139
install:
1410
- pip install "django>=$DJANGO_VERSION_MIN,<$DJANGO_VERSION_MAX"
1511
- "pip install -e ."
@@ -22,5 +18,5 @@ after_success:
2218

2319
matrix:
2420
exclude:
25-
- python: "2.7"
26-
env: DJANGO_VERSION_MIN=2.0 DJANGO_VERSION_MAX=2.1
21+
- python: "3.4"
22+
env: DJANGO_VERSION_MIN=2.2 DJANGO_VERSION_MAX=2.3

django_prbac/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
from __future__ import unicode_literals
2-
__version__ = '0.0.7'
2+
__version__ = '0.0.8'

django_prbac/mock_settings.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
'django.contrib.contenttypes',
2323
'django.contrib.sessions',
2424
'django.contrib.staticfiles',
25+
'django.contrib.messages',
2526

2627
# And this app
2728
'django_prbac',
@@ -30,3 +31,21 @@
3031
STATIC_URL = '/static/'
3132

3233
ROOT_URLCONF = 'django_prbac.urls'
34+
35+
MIDDLEWARE = [
36+
'django.contrib.auth.middleware.AuthenticationMiddleware',
37+
'django.contrib.messages.middleware.MessageMiddleware',
38+
'django.contrib.sessions.middleware.SessionMiddleware',
39+
]
40+
41+
TEMPLATES = [
42+
{
43+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
44+
'OPTIONS': {
45+
'context_processors': [
46+
'django.contrib.auth.context_processors.auth',
47+
'django.contrib.messages.context_processors.messages',
48+
],
49+
}
50+
},
51+
]

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ def get_readme():
3232
packages=find_packages(),
3333
zip_safe=False,
3434
install_requires=[
35-
# avoid django>=2.1.0,<2.1.15,>=2.2.0,<2.2.8 due to CVE-2019-19118
36-
# https://github.com/advisories/GHSA-hvmf-r92r-27hr
37-
'django>=1.8,<2.1',
38-
'jsonfield>=1.0.3',
35+
# avoid django 1 <1.11.28 and django 2 <2.2.10
36+
# https://github.com/advisories/GHSA-hmr4-m2h5-33qx
37+
'django>=1.11.28,!=2.0.*,!=2.1.*,!=2.2.0,!=2.2.1,!=2.2.2,!=2.2.3,!=2.2.4,!=2.2.5,!=2.2.6,!=2.2.7,!=2.2.8,!=2.2.9,<3',
38+
'jsonfield>=1.0.3,<3',
3939
'simplejson',
4040
'six',
4141
],

0 commit comments

Comments
 (0)