changeset 2303:db7c80c2d681

mod_onions: Escape period in pattern
author Kim Alvefur <zash@zash.se>
date Fri, 23 Sep 2016 11:54:30 +0200
parents 12249570352f
children a881494238af
files mod_onions/mod_onions.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_onions/mod_onions.lua	Thu Sep 22 14:35:43 2016 +0200
+++ b/mod_onions/mod_onions.lua	Fri Sep 23 11:54:30 2016 +0200
@@ -236,7 +236,7 @@
 	local onion_host = nil;
 	local onion_port = nil;
 
-	if not to_host:find(".onion(.?)$") then
+	if not to_host:find("%.onion(%.?)$") then
 		if onions_map[to_host] then
 			if type(onions_map[to_host]) == "string" then
 				onion_host = onions_map[to_host];