Changeset

1875:ee2cedb0f691

mod_s2s_auth_fingerprint: Limit number of replacements instead of stripping extra separators
author Kim Alvefur <zash@zash.se>
date Sun, 27 Sep 2015 13:19:52 +0200
parents 1874:8ef500508c59
children 1876:9c9397d692aa
files mod_s2s_auth_fingerprint/mod_s2s_auth_fingerprint.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_s2s_auth_fingerprint/mod_s2s_auth_fingerprint.lua	Thu Sep 24 07:22:11 2015 +0200
+++ b/mod_s2s_auth_fingerprint/mod_s2s_auth_fingerprint.lua	Sun Sep 27 13:19:52 2015 +0200
@@ -12,7 +12,7 @@
 end
 
 local function hashfmt(h)
-	return h:gsub("..",":%0"):sub(2):upper();
+	return h:gsub("..","%0:", #h/2-1):upper();
 end
 
 for host, set in pairs(module:get_option("s2s_trusted_fingerprints", {})) do