acme.sh icon indicating copy to clipboard operation
acme.sh copied to clipboard

If ACCOUNT_URL is empty when we need it, re-read it. Fixes #1360

Open jim-p opened this issue 7 years ago • 3 comments

Fix #1360 by re-reading the account URL if it is empty when needed for ACME v2

jim-p avatar Mar 14 '18 17:03 jim-p

but why is ACCOUNT_URL empty here ?

Neilpang avatar Mar 15 '18 03:03 Neilpang

It may be a quirk of how it is executed on pfSense, in which case I can just keep that fix local there. It almost always fails the first time it is run but works the second time. The difference being that the first time, the account data, csr, keys, etc, have just been written to the filesystem for the first time. When run the second time, those files already exist.

The logs show the ACCOUNT_URL is there earlier in the process, but somehow by the point it is needed, it is no longer set in the environment. Following through the code I didn't see anything obvious that pointed to why, however, but re-reading it worked and seemed like a better solution since it did not rely on something else reading it sooner and happening to place it in the environment.

jim-p avatar Mar 15 '18 12:03 jim-p

@jim-p please try again with latest code. it's fixed.

Neilpang avatar Mar 20 '18 11:03 Neilpang