Skip to content

Commit 58f9603

Browse files
committed
Merge pull request encode#2755 from rouge8/tab-switching-backport
Backport 7872d0a to 2.4.x
2 parents 67ae6b2 + 2a6f25c commit 58f9603

File tree

5 files changed

+15
-3
lines changed

5 files changed

+15
-3
lines changed

docs/topics/release-notes.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ You can determine your currently installed version using `pip freeze`:
4040

4141
## 2.4.x series
4242

43+
### 2.4.5
44+
45+
**Date**: 24 March 2015
46+
47+
* **Security fix**: Escape tab switching cookie name in browsable API. [Backported from 3.1.1](http://www.django-rest-framework.org/topics/release-notes/#311).
48+
4349
### 2.4.4
4450

4551
**Date**: [3rd November 2014](https://github.com/tomchristie/django-rest-framework/issues?q=milestone%3A%222.4.4+Release%22+).

requirements-test.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
pytest-django==2.6
33
pytest==2.5.2
44
pytest-cov==1.6
5-
flake8==2.2.2
5+
pep8==1.5.7
6+
flake8==2.4.0
67

78
# Optional packages
89
markdown>=2.1.0

rest_framework/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"""
99

1010
__title__ = 'Django REST framework'
11-
__version__ = '2.4.4'
11+
__version__ = '2.4.5'
1212
__author__ = 'Tom Christie'
1313
__license__ = 'BSD 2-Clause'
1414
__copyright__ = 'Copyright 2011-2014 Tom Christie'

rest_framework/static/rest_framework/js/default.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ $('a[data-toggle="tab"]').click(function(){
4343
var selectedTab = null;
4444
var selectedTabName = getCookie('tabstyle');
4545

46+
if (selectedTabName) {
47+
selectedTabName = selectedTabName.replace(/[^a-z-]/g, '');
48+
}
49+
4650
if (selectedTabName) {
4751
selectedTab = $('.form-switcher a[name=' + selectedTabName + ']');
4852
}

tox.ini

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ setenv =
1515
[testenv:flake8]
1616
basepython = python2.7
1717
deps = pytest==2.5.2
18-
flake8==2.2.2
18+
pep8==1.5.7
19+
flake8==2.4.0
1920
commands = ./runtests.py --lintonly
2021

2122
[testenv:py3.4-django1.7]

0 commit comments

Comments
 (0)