|
postURL := fmt.Sprintf("https://%s/_matrix/identity/api/v1/validate/email/requestToken", req.IDServer) |
|
|
|
data := url.Values{} |
|
data.Add("client_secret", req.Secret) |
|
data.Add("email", req.Email) |
|
data.Add("send_attempt", strconv.Itoa(req.SendAttempt)) |
|
|
|
request, err := http.NewRequest(http.MethodPost, postURL, strings.NewReader(data.Encode())) |
|
if err != nil { |
|
return "", err |
|
} |
|
request.Header.Add("Content-Type", "application/x-www-form-urlencoded") |
|
|
|
resp, err := client.DoHTTPRequest(ctx, request) |
When an IDServer definition without port (like "matrix.org") is used, the fclient implementation will attempt matrix federation traffic.
https://matrix-federation.matrix.org/_matrix/identity/api/v1/validate/email/requestToken does not exist however, only
https://matrix.org:443/_matrix/identity/api/v1/validate/email/requestToken does.
dendrite/clientapi/threepid/threepid.go
Lines 61 to 74 in e546df2
When an IDServer definition without port (like "matrix.org") is used, the fclient implementation will attempt matrix federation traffic.
https://matrix-federation.matrix.org/_matrix/identity/api/v1/validate/email/requestToken does not exist however, only
https://matrix.org:443/_matrix/identity/api/v1/validate/email/requestToken does.