Skip to main content

detect_message

Function detect_message 

Source
pub fn detect_message(words: &Codes, card: &Card) -> Option<OneTimeCode>
Expand description

Finds a short-lived secret in a message read from mail. Bulk headers (Card::is_list: List-Unsubscribe, List-Id, Precedence: bulk) are how many sites send codes and links too, so they never rule one out: they only narrow the reading to the subject and the top of the text (LEAD), and a phrase that hands nothing over by itself (a reset, a link, an address to confirm, a password), when it is not in the subject, counts only beside a line that answers a request (“if you did not ask for this…”, Codes::request) or a link said to expire. A newsletter’s article on passwords is none.