Start support for XMPP game password change
Dependencies
- [2]
ZRU62WXDSend email with change game password link - [3]
TRBYOQBICheck CSRF and user existence - [4]
WLWTNO4YCreate form to request game password change link - [5]
I6SOPEQFCreate and store reset password token - [*]
HZDCKIXQUse constants for templates - [*]
EVP2FSBHSplit index page - [*]
WVHXYKCVAdd postgresql pools - [*]
4MZ4VIR7Initial commit - [*]
BCXEUKX6Add config, static files and web server - [*]
Z3SYSC25Add SMTP configuration - [*]
7R6HAATPOptional publish static files if use reverse-proxy
Change contents
- edit in src/templates/query-reset-game-pwd.html at line 22
<input type="radio" name="contact_type" value="xmpp">XMPP<br> - edit in src/pages/query_reset_game_pwd.rs at line 70
}enum Protocol {Email,Xmpp, - replacement in src/pages/query_reset_game_pwd.rs at line 91
if form.contact_type != "email" {log::warn!("Unknown data for contact type: {}", form.contact_type);return HttpResponse::BadRequest().body("Incorrect");}let protocol = match form.contact_type.as_str() {"email" => Protocol::Email,"xmpp" => Protocol::Xmpp,_ => {log::warn!("Unknown data for contact type: {}", form.contact_type);return HttpResponse::BadRequest().body("Incorrect");}}; - replacement in src/pages/query_reset_game_pwd.rs at line 161
log::info!("Sending {} type {} to {}",token_url,form.contact_type,form.login);match protocol {Protocol::Email => {if let Err(e) =send_email(&data.mailer, &data.mailer_from, token_url, &form.contact).await{log::error!("Cann't send email: {}", e);return HttpResponse::ServiceUnavailable().body(actix_web::body::None::new());}}Protocol::Xmpp => {}}; - edit in src/pages/query_reset_game_pwd.rs at line 173
if let Err(e) = send_email(&data.mailer, &data.mailer_from, token_url, &form.contact).await {log::error!("Cann't send email: {}", e);return HttpResponse::ServiceUnavailable().body(actix_web::body::None::new());} - edit in src/pages/mod.rs at line 37
pub xmpp_url: String, - edit in src/main.rs at line 51
xmpp_url, - edit in src/main.rs at line 142
xmpp_url, - edit in src/config.rs at line 36[12.486][13.731]
pub xmpp_url: String,