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
edx
edx-platform
Commits
141c0af0
Commit
141c0af0
authored
Jul 20, 2017
by
George Song
Committed by
GitHub
Jul 20, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15586 from jspayd/hide-passwords-upstream
Hide passwords in crash reports
parents
42fffdfa
97d5e3d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
openedx/core/djangoapps/user_api/views.py
+9
-0
No files found.
openedx/core/djangoapps/user_api/views.py
View file @
141c0af0
...
...
@@ -9,6 +9,7 @@ from django.http import HttpResponse, HttpResponseForbidden
from
django.utils.decorators
import
method_decorator
from
django.utils.translation
import
ugettext
as
_
from
django.views.decorators.csrf
import
csrf_exempt
,
csrf_protect
,
ensure_csrf_cookie
from
django.views.decorators.debug
import
sensitive_post_parameters
from
django_countries
import
countries
from
django_filters.rest_framework
import
DjangoFilterBackend
from
opaque_keys
import
InvalidKeyError
...
...
@@ -156,6 +157,10 @@ class LoginSessionView(APIView):
from
student.views
import
login_user
return
shim_student_view
(
login_user
,
check_logged_in
=
True
)(
request
)
@method_decorator
(
sensitive_post_parameters
(
"password"
))
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
return
super
(
LoginSessionView
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
class
RegistrationView
(
APIView
):
"""HTTP end-points for creating a new user. """
...
...
@@ -381,6 +386,10 @@ class RegistrationView(APIView):
set_logged_in_cookies
(
request
,
response
,
user
)
return
response
@method_decorator
(
sensitive_post_parameters
(
"password"
))
def
dispatch
(
self
,
request
,
*
args
,
**
kwargs
):
return
super
(
RegistrationView
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
def
_add_email_field
(
self
,
form_desc
,
required
=
True
):
"""Add an email field to a form description.
...
...
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