Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
5cbfcbc5
Commit
5cbfcbc5
authored
Jun 16, 2017
by
Levi Cameron
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix regex typo allowing '[' in boundary string
parent
6b8d6019
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
rest_framework/static/rest_framework/js/ajax-form.js
+1
-1
No files found.
rest_framework/static/rest_framework/js/ajax-form.js
View file @
5cbfcbc5
...
@@ -42,7 +42,7 @@ function doAjaxSubmit(e) {
...
@@ -42,7 +42,7 @@ function doAjaxSubmit(e) {
// We need to add a boundary parameter to the header
// We need to add a boundary parameter to the header
// We assume the first valid-looking boundary line in the body is correct
// We assume the first valid-looking boundary line in the body is correct
// regex is from RFC 2046 appendix A
// regex is from RFC 2046 appendix A
var
boundaryCharNoSpace
=
"
[
0-9A-Z'()+_,-./:=?"
;
var
boundaryCharNoSpace
=
"0-9A-Z'()+_,-./:=?"
;
var
boundaryChar
=
boundaryCharNoSpace
+
' '
;
var
boundaryChar
=
boundaryCharNoSpace
+
' '
;
var
re
=
new
RegExp
(
'^--(['
+
boundaryChar
+
']{0,69}['
+
boundaryCharNoSpace
+
'])[
\\
s]*?$'
,
'im'
);
var
re
=
new
RegExp
(
'^--(['
+
boundaryChar
+
']{0,69}['
+
boundaryCharNoSpace
+
'])[
\\
s]*?$'
,
'im'
);
var
boundary
=
data
.
match
(
re
);
var
boundary
=
data
.
match
(
re
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment