Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Update Certificate Subdomain Check Fails For Some CURL Versions #113
Comments
|
Hi @markfennema, do you want the updated check to be looks like- https://github.com/loggly/install-script/blob/master/Linux%20Script/configure-linux.sh#L357 so that the script passes the subdomain if the response is either 200 or 200 OK, is that right? Also, do you mind sharing your setup in which you are using this update-loggly-certificate.sh script? Thanks for the additional information. |
|
That looks great to me. I'm on vacation right now, so I'm out of the office (and am not sure off the top of my head the exact details of the environment it was failing on), but I'll get back to you next week. |
|
Here is the curl version information:
The machine is running Amazon Linux AMI release 2016.09 |
|
Hi @markfennema, Sorry for the late reply. So I checked on the Amazon Linux AMI machine and verified the curl output of the login command and could see the same output as you pasted in your first comment. See below-
The weird thing that I noticed was in the GitHub code it is grep "200 OK" at line #306 but when you download this script on your machine and see the code it is grep "200" at the same line. Being grep "200", currently passes the subdomain check for both responses- "200 OK" and "200". I tested on 2 machines with both response codes and the script didn't break/failed for subdomain check. Also, can you please check and let me know how did you come to know that it is breaking so that I can test as well? Thanks for your input. |
|
I followed the instructions on this page: https://www.loggly.com/docs/upgrade-tls-certificate/ But I double checked that file and now it's fixed. It definitely was the 200 OK version when I downloaded it in April (or else I never would have found the issue). |
|
Hello @markfennema, Since now it's fixed for you I'll just update the GitHub code to- grep "200" so that it doesn't confuse anyone and will be the same as deployed script code. I'll close the issue once I update it. Thanks. |
|
Since it has already been handled, closing this issue. |
The
update-loggly-certificate.shscript uses agrep "200 OK"check to see if a subdomain exists. However, some versions of CURL have the following output instead:Note that it simply states 200 rather than 200 OK.
The grep command could easily be modified to work with this version of CURL as well.
The text was updated successfully, but these errors were encountered: