Skip to content

email activation (of non primary addresses) broken #11128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
2 of 7 tasks
stbuehler opened this issue Apr 19, 2020 · 1 comment · Fixed by #11129
Closed
2 of 7 tasks

email activation (of non primary addresses) broken #11128

stbuehler opened this issue Apr 19, 2020 · 1 comment · Fixed by #11129
Labels
Milestone

Comments

@stbuehler
Copy link

  • Gitea version (or commit ref): 1.11.4
  • Git version: 1:2.20.1-2+deb10u2
  • Operating system: debian buster
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No: doesn't seem to require email activation, added address already is activated
    • Not relevant
  • Log gist: none

Description

Clicking Send Activation on /user/settings/accounts doesn't trigger any mail, but doesn't show any error (just "reloads" the page).

The issue is in the template:

<input name="id" type="hidden" value="{{if .IsPrimary}}PRIMARY{{else}}}.ID{{end}}">

In the generated HTML page it will show <input name="id" type="hidden" value="}.ID">.

Log show:

gitea[25052]: [Macaron] 2020-04-19 10:04:29: Completed POST /user/settings/account/email 302 Found in 2.042836ms
gitea[25052]: 2020/04/19 10:04:29 ...r/setting/account.go:121:EmailPost() [E] Send activation: email not set for activation

Don't think this could have ever worked since #10557.

@zeripath
Copy link
Contributor

Good catch. It's almost certainly because VSCode will helpfully occasionally add a third closing curly bracket when you type two curly brackets in a row. I spotted a second one and added that to the PR.

zeripath added a commit to zeripath/gitea that referenced this issue Apr 19, 2020
lunny pushed a commit that referenced this issue Apr 19, 2020
…d send account ID in account.tmpl (#11129)

* Remove errant third } from account.tmpl

Fix #11128

Signed-off-by: Andrew Thornton <[email protected]>

* Remove errant third curly bracket from pull.tmpl

Signed-off-by: Andrew Thornton <[email protected]>

* Update templates/user/settings/account.tmpl
@lunny lunny added the type/bug label Apr 19, 2020
@lunny lunny added this to the 1.11.5 milestone Apr 19, 2020
lunny pushed a commit that referenced this issue Apr 19, 2020
…account ID in account.tmpl (#11130)

* Remove errant third } from account.tmpl

Fix #11128

Signed-off-by: Andrew Thornton <[email protected]>

* Update templates/user/settings/account.tmpl
ydelafollye pushed a commit to ydelafollye/gitea that referenced this issue Jul 31, 2020
…d send account ID in account.tmpl (go-gitea#11129)

* Remove errant third } from account.tmpl

Fix go-gitea#11128

Signed-off-by: Andrew Thornton <[email protected]>

* Remove errant third curly bracket from pull.tmpl

Signed-off-by: Andrew Thornton <[email protected]>

* Update templates/user/settings/account.tmpl
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
3 participants