diff options
author | 6543 <6543@obermui.de> | 2020-11-28 23:41:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-28 17:41:06 -0500 |
commit | 0f14f69e6070c9aca09f57c419e7d6007d0e520b (patch) | |
tree | 4bf05d1a4e98d6aabc1b36da644628954d0805da /templates/user | |
parent | e82150d41b74304dc332fbd0c077ec99c72a5c76 (diff) | |
download | gitea-0f14f69e6070c9aca09f57c419e7d6007d0e520b.tar.gz gitea-0f14f69e6070c9aca09f57c419e7d6007d0e520b.zip |
Verify password for local-account activation (#13631)
* Verify passwords for activation
This is to prevent 3rd party activation
* Fix function comment
* only veify password on local-account aktivation
* fix lint
* Update templates/user/auth/activate.tmpl
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Andreas Shimokawa <shimokawa@fsfe.org>
Co-authored-by: Lauris BH <lauris@nix.lv>
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: zeripath <art27@cantab.net>
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'templates/user')
-rw-r--r-- | templates/user/auth/activate.tmpl | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl index c24362bb8c..c3f136add4 100644 --- a/templates/user/auth/activate.tmpl +++ b/templates/user/auth/activate.tmpl @@ -18,7 +18,19 @@ <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" (.SignedUser.Email|Escape) .ActiveCodeLives | Str2html}}</p> {{end}} {{else}} - {{if .IsSendRegisterMail}} + {{if .NeedsPassword}} + <form class="ui form" action="/user/activate" method="post"> + <div class="required inline field"> + <label for="password">{{.i18n.Tr "password"}}</label> + <input id="password" name="password" type="password" autocomplete="off" required> + </div> + <div class="inline field"> + <label></label> + <button class="ui green button">{{.i18n.Tr "install.confirm_password"}}</button> + </div> + <input id="code" name="code" type="hidden" value="{{.Code}}"> + </form> + {{else if .IsSendRegisterMail}} <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" (.Email|Escape) .ActiveCodeLives | Str2html}}</p> {{else if .IsActivateFailed}} <p>{{.i18n.Tr "auth.invalid_code"}}</p> |