parent
115f5a5c31
commit
77917477fe
1 changed files with 5 additions and 0 deletions
|
@ -22,6 +22,11 @@ pub async fn post_update_ldap(mut req: Request<State>) -> tide::Result {
|
||||||
value,
|
value,
|
||||||
} = req.body_json().await?;
|
} = req.body_json().await?;
|
||||||
|
|
||||||
|
// check that any mail is not using @skynet.ie
|
||||||
|
if field == "mail" && value.trim().ends_with("@skynet.ie") {
|
||||||
|
return Ok(json!({"result": "error", "error": "skynet email not valid contact address"}).into());
|
||||||
|
}
|
||||||
|
|
||||||
let config = &req.state().config;
|
let config = &req.state().config;
|
||||||
|
|
||||||
// easier to give each request its own connection
|
// easier to give each request its own connection
|
||||||
|
|
Loading…
Reference in a new issue