diff --git a/acme-http01-webroot.lua b/acme-http01-webroot.lua index f45445d..efd9176 100644 --- a/acme-http01-webroot.lua +++ b/acme-http01-webroot.lua @@ -84,8 +84,8 @@ end -- see https://github.com/letsencrypt/acme-spec/blob/master/draft-barnes-acme.md -- function sanitizeToken(token) - _strip="[^%a%d%+%-%_=]" - token = token:gsub(_strip,'') + local pattern="^[%a%d%-_]+$" + token = token:match(pattern) return token end @@ -104,4 +104,4 @@ function getKeyAuth(token) end core.register_init(acme.startup) -core.register_service("acme-http01", "http", acme.http01) \ No newline at end of file +core.register_service("acme-http01", "http", acme.http01)