# HG changeset patch # User Emmanuel Gil Peyrot # Date 1520450028 -3600 # Node ID 415455faccae4958590400f8a6f4652424aab5f8 # Parent 1d6bec35b752eb192da9c231ead0eb5dfff4a78e mod_inject_ecaps2: Return if calculating the hash failed diff -r 1d6bec35b752 -r 415455faccae mod_inject_ecaps2/mod_inject_ecaps2.lua --- a/mod_inject_ecaps2/mod_inject_ecaps2.lua Wed Mar 07 19:40:20 2018 +0100 +++ b/mod_inject_ecaps2/mod_inject_ecaps2.lua Wed Mar 07 20:13:48 2018 +0100 @@ -71,7 +71,11 @@ return; end - local extension_string = calculate_hash(disco_info); + local extension_string, err = calculate_hash(disco_info); + if extension_string == nil then + module:log("warn", "Failed to calculate ecaps2 hash: %s", err) + return; + end local ecaps2 = st.stanza("c", { xmlns = "urn:xmpp:caps" }); for algo in algorithms do