fix: if email is empty set to a dummy address based on the pubkey
This commit is contained in:
parent
dd66f560ef
commit
1054c52e2f
|
@ -7,6 +7,7 @@ import (
|
||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"errors"
|
"errors"
|
||||||
|
"fmt"
|
||||||
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
|
"git.lumeweb.com/LumeWeb/libs5-go/encoding"
|
||||||
"git.lumeweb.com/LumeWeb/libs5-go/types"
|
"git.lumeweb.com/LumeWeb/libs5-go/types"
|
||||||
"git.lumeweb.com/LumeWeb/portal/db/models"
|
"git.lumeweb.com/LumeWeb/portal/db/models"
|
||||||
|
@ -303,6 +304,10 @@ func (h *HttpHandler) AccountRegister(jc jape.Context) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if request.Email == "" {
|
||||||
|
request.Email = fmt.Sprintf("%s@%s", hex.EncodeToString(decodedKey[1:]), "example.com")
|
||||||
|
}
|
||||||
|
|
||||||
verify, _ := h.verifier.Verify(request.Email)
|
verify, _ := h.verifier.Verify(request.Email)
|
||||||
|
|
||||||
if !verify.Syntax.Valid {
|
if !verify.Syntax.Valid {
|
||||||
|
|
Loading…
Reference in New Issue