Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
07466b67
Commit
07466b67
authored
Apr 11, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
security: fixed returning info on weither user exists or not in password reset call, fixes #7619
parent
a109049d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
pkg/api/password.go
+2
-1
public/app/partials/reset_password.html
+11
-4
No files found.
pkg/api/password.go
View file @
07466b67
...
...
@@ -12,7 +12,8 @@ func SendResetPasswordEmail(c *middleware.Context, form dtos.SendResetPasswordEm
userQuery
:=
m
.
GetUserByLoginQuery
{
LoginOrEmail
:
form
.
UserOrEmail
}
if
err
:=
bus
.
Dispatch
(
&
userQuery
);
err
!=
nil
{
return
ApiError
(
404
,
"User does not exist"
,
err
)
c
.
Logger
.
Info
(
"Requested password reset for user that was not found"
,
"user"
,
userQuery
.
LoginOrEmail
)
return
ApiError
(
200
,
"Email sent"
,
err
)
}
emailCmd
:=
m
.
SendResetPasswordEmailCommand
{
User
:
userQuery
.
Result
}
...
...
public/app/partials/reset_password.html
View file @
07466b67
...
...
@@ -21,15 +21,22 @@
</div>
<div
class=
"gf-form-button-row"
>
<br
/>
<br
/>
<button
type=
"submit"
class=
"btn btn-large"
ng-click=
"sendResetEmail();"
ng-class=
"{'btn-inverse': !sendResetForm.$valid, 'btn-primary': sendResetForm.$valid}"
>
Send reset instructions
Reset Password
</button>
</div>
</form>
<h5
style=
"text-align: center; padding: 20px;"
ng-if=
"mode === 'email-sent'"
>
An email with a reset link as been sent to the email address, you should receive it shortly.
</h5>
<div
style=
"text-align: center; padding: 20px;"
ng-if=
"mode === 'email-sent'"
>
An email with a reset link as been sent to the email address.
<br>
You should receive it shortly.
</div>
<br
/>
<br
/>
<form
name=
"resetForm"
class=
"login-form gf-form-group"
ng-show=
"mode === 'reset'"
>
<div
class=
"gf-form"
>
...
...
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