Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
edx-platform-release
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Hsin-Yu Chien
edx-platform-release
Commits
141c0af0
Commit
141c0af0
authored
7 years ago
by
George Song
Committed by
GitHub
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #15586 from jspayd/hide-passwords-upstream
Hide passwords in crash reports
parents
42fffdfa
97d5e3d8
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
openedx/core/djangoapps/user_api/views.py
+9
-0
9 additions, 0 deletions
openedx/core/djangoapps/user_api/views.py
with
9 additions
and
0 deletions
openedx/core/djangoapps/user_api/views.py
+
9
−
0
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.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment