我只是尝试使用下面的 luarocks 命令安装 lua-resty-auto-ssl:
sudo luarocks install lua-resty-auto-ssl
但它仍在使用脱水版本 0.5.0,该版本存在一个错误,即在验证期间从 letencrypt 获取 Replay-Nonce 标头。 我必须更新脱水文件才能使其正常工作!
我们可以更新 luarocks 存储库吗?
根据帖子上的letsencrypt论坛letsencrypt改变了他们的CDN昨天,这是造成与0.5.0版本的脱水问题。
计划中的 0.13.0 版本看起来包括 0.6.5 的脱水版本,据说可以解决这个问题。
谢谢@im-erikjohansson。
对于任何面临类似问题的人,您需要更新位于“/usr/local/openresty/luajit/bin/resty-auto-ssl/dehydred”的“脱水”文件。
更新以下几行:
REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"
到REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep -i Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"
和
# Retrieve nonce from acme-server
if [[ ${API} -eq 1 ]]; then
nonce="$(http_request head "${CA}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
else
nonce="$(http_request head "${CA_NEW_NONCE}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
fi
到
# Retrieve nonce from acme-server
if [[ ${API} -eq 1 ]]; then
nonce="$(http_request head "${CA}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
else
nonce="$(http_request head "${CA_NEW_NONCE}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
fi
@ronaldgetz谢谢你,完美的临时修复。
知道什么时候发布 0.13.0 版本吗?
0.13.0 版本需要尽快发布。 我可以做些什么来帮助解决这个问题?
@GUI你能
脱水固定那个
这应该是高优先级。 我不想苛求什么,因为我知道维护开源项目需要做多少工作,但是请发布此版本的新版本,因为不能再发布新的 SSL 证书。
如果有人像我们一样在 Docker 容器上运行它 - 我们部署了这样的修复:
# Temporary fix for https://github.com/GUI/lua-resty-auto-ssl/issues/192
RUN sed -i 's/grep Location/grep -i Location/g' /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated && \
sed -i 's/grep Replay/grep -i Replay/g' /usr/local/openresty/luajit/bin/resty-auto-ssl/dehydrated
谢谢@ronaldgetz的修复。
酷,它也在我身边解决了这个问题
Details:
{
"type": "urn:acme:error:badNonce",
"detail": "JWS has no anti-replay nonce",
"status": 400
}
耽误了大家,给大家带来的困扰还请见谅! v0.13.0 现已发布,其中包含捆绑的较新版本的脱水。如果您仍然发现新版本有任何问题,请大声疾呼。
并感谢大家报告此问题和临时解决方法!
@GUI感谢您快速发布新的固定版本。 这绝对不是常见的维护者反应那么快。 你在这里做得很好。 👍所以再次谢谢你。
以下是@ronaldgetz更改作为补丁,以便更轻松地进行热修复:
--- luajit/bin/resty-auto-ssl/dehydrated 2019-10-23 16:05:48.322378013 +0200
+++ luajit/bin/resty-auto-ssl/dehydrated 2019-10-23 16:08:12.359383225 +0200
@@ -296,7 +296,7 @@
else
# Check if private account key exists, if it doesn't exist yet generate a new one (rsa key)
if [[ ! -e "${ACCOUNT_KEY}" ]]; then
- REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"
+ REAL_LICENSE="$(http_request head "${CA_TERMS}" | (grep -i Location: || true) | awk -F ': ' '{print $2}' | tr -d '\n\r')"
if [[ -z "${REAL_LICENSE}" ]]; then
printf '\n' >&2
printf 'Error retrieving terms of service from certificate authority.\n' >&2
@@ -523,9 +523,9 @@
# Retrieve nonce from acme-server
if [[ ${API} -eq 1 ]]; then
- nonce="$(http_request head "${CA}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
+ nonce="$(http_request head "${CA}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
else
- nonce="$(http_request head "${CA_NEW_NONCE}" | grep Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
+ nonce="$(http_request head "${CA_NEW_NONCE}" | grep -i Replay-Nonce: | awk -F ': ' '{print $2}' | tr -d '\n\r')"
fi
# Build header with just our public key and algorithm information
最有用的评论
耽误了大家,给大家带来的困扰还请见谅! v0.13.0 现已发布,其中包含捆绑的较新版本的脱水。如果您仍然发现新版本有任何问题,请大声疾呼。
并感谢大家报告此问题和临时解决方法!