Changeset

2306:ad40c094e7d7

mod_onions: Prevent s2s_secure_auth policy enforcement from rejecting .onion connections
author Kim Alvefur <zash@zash.se>
date Fri, 23 Sep 2016 13:20:49 +0200
parents 2305:7db4d3f5fb73
children 2307:ad7f87bd30c8
files mod_onions/mod_onions.lua
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mod_onions/mod_onions.lua	Fri Sep 23 13:18:14 2016 +0200
+++ b/mod_onions/mod_onions.lua	Fri Sep 23 13:20:49 2016 +0200
@@ -273,3 +273,11 @@
 module:log("debug", "Onions ready and loaded");
 
 module:hook("route/remote", route_to_onion, 200);
+
+module:hook_global("s2s-check-certificate", function (event)
+	local host = event.host;
+	if host and host:find("%.onion$") then
+		return true;
+	end
+end);
+