outroll / vesta

VESTA Control Panel

Home Page:http://vestacp.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Possible bug in (v-add-letsencrypt-domain) resulting msg Error: Let's Encrypt validation status // without code

matjaz-cas opened this issue · comments

The problem:

Click on web profile > EDIT > check SSL Support (Lets Encrypt Support)

In some cases (only one account so far), when I clicked SAVE I got message saying (Error: Let's Encrypt validation status) - without any status code at the end or info on what is the cause of this validation error.

After I checked the logs I saw that in some cases json returned from letsencrypt API was not parsed correctly so it resulted in error without any error code identification.

I checked the file "v-add-letsencrypt-domain" the problem was in STEP 3, when parsing url= parameter line:172 was not parsing correctly.
I changed from:
url=$(echo "$answer" |grep -A3 $proto |grep url |cut -f 4 -d \")
to
url=$(echo "$answer" |grep -A2 $proto |grep url |cut -f 4 -d \")

after that it worked, i checked parsing of other already working letsencrypt accounts and it also worked from them, so this change didn't break it.. anyways I solved it and changed it back to -A3.. maybe someone check this?

same for me