Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
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
OpenEdx
edx-platform
Commits
348ee515
Commit
348ee515
authored
Dec 25, 2012
by
ichuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve security (disallow funny chars in git repo and branch names)
parent
b3fe8687
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
cms/djangoapps/contentstore/export.py
+3
-3
No files found.
cms/djangoapps/contentstore/export.py
View file @
348ee515
...
@@ -81,11 +81,11 @@ def export_course(request, org, course, name):
...
@@ -81,11 +81,11 @@ def export_course(request, org, course, name):
log
.
debug
(
'action=
%
s'
%
action
)
log
.
debug
(
'action=
%
s'
%
action
)
if
request
.
method
==
'POST'
and
action
==
'Set Git Repository Info'
:
if
request
.
method
==
'POST'
and
action
==
'Set Git Repository Info'
:
git_repo
=
request
.
POST
[
'git_repo'
]
git_repo
=
request
.
POST
[
'git_repo'
]
.
replace
(
';'
,
'_'
)
.
replace
(
'
\n
'
,
''
)
git_branch
=
request
.
POST
[
'git_branch'
]
git_branch
=
request
.
POST
[
'git_branch'
]
.
replace
(
';'
,
'_'
)
.
replace
(
'
\n
'
,
''
)
exportinfo
[
'git_repo'
]
=
git_repo
exportinfo
[
'git_repo'
]
=
git_repo
exportinfo
[
'git_branch'
]
=
git_branch
exportinfo
[
'git_branch'
]
=
git_branch
log
.
debug
(
'set export info
'
)
log
.
debug
(
'set export info
(
%
s,
%
s)'
%
(
git_repo
,
git_branch
)
)
m
=
re
.
search
(
'/([^/]+)
\
.git$'
,
git_repo
)
# get local_dir from git_repo
m
=
re
.
search
(
'/([^/]+)
\
.git$'
,
git_repo
)
# get local_dir from git_repo
if
m
:
if
m
:
...
...
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