-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
URGENT: fix dns_nsupdate when NSUPDATE_OPT is empty #5285
Conversation
Welcome |
3123fe2
to
f64434d
Compare
f64434d
to
22d260f
Compare
Yes, the
But this is desired, it's necessary to fix the bug (and the old It would be possible to pass the |
@Neilpang Please review. If you accept this bugfix, please also issue a new minor release (otherwise the broken release will get rolled out everywhere). Thank you! |
@fraenki - your fix works fine. My own full checks worked out fine without double quotes. Thanks for your fix. |
fix the shellcheck errors |
@fraenki
and using this command instead:
Should fix the shellcheck error - except the last error regarding usage of $? instead of command... |
I've tried this, but unfortunately it does not work: nsupdate requires double quotes around the filename when using the
Currently testing another fix, but I have to wait an hour because I've hit the Let's Encrypt rate limit. 🤦♂️ |
I also tried some alternatives. This one seems to run, taking the correct key file and without nsupdate_cmd="nsupdate -k ${NSUPDATE_KEY} ${nsdebug} ${NSUPDATE_OPT}"
if [ -z "${NSUPDATE_ZONE}" ]; then
${nsupdate_cmd} <<EOF Unfortunately, I hit auth limits on my nameserver to fully test deployment. 🤦♂️ For the error check at the end (another No |
In my forked repo, |
Unfortunately, it results in an error, because nsupdate expects the key file to be wrapped in double quotes:
With nsupdate the rule seems to be: files need to be wrapped in double quotes, all other options must not use double quotes. |
Maybe the filename without
Edit: maybe this is "good enough" for a push and minor-release to cover at least most dns_nsupdate installations and fix the filename-without-key|private in a second step? |
@Neilpang Fixed. Please review/merge. |
With nsupdate the rule seems to be: filenames need to be wrapped in double quotes, while all other options must not use double quotes. Hence there is no way to resolve the shellcheck offense, because the key requires quotes, but the other options must not use quotes.
761bd2d
to
9ecd840
Compare
@Neilpang Would it be possible to get a new release of acme.sh that includes this fix? Thanks! |
PR #5224 introduced a new parameter
$NSUPDATE_OPT
todns_nsupdate
. However, now this DNSAPI is broken, if the new parameter is empty/unset:This is a major issue, because it will affect almost ALL users of
dns_nsupdate
.The root cause is easily demonstrated by the following code snippet:
Note that nsupdate interprets an empty string as a file/input. So when passing an empty parameter to nsupdate, it must not use double quotes.