-
-
Notifications
You must be signed in to change notification settings - Fork 95
Add HTTPS support if cPanel Server doesn't support #51
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
base: master
Are you sure you want to change the base?
Conversation
This will check if the server is running cPanel, then it will check if WGET has HTTPS support, if it doesn't it will remove the current WGET RPM and install it from YUM.
|
Rather than force users to update wget, it may be better to use a non-https download (http or ftp). |
|
I would rather not have users pipe a command directly into bash from an insecure connection! shellshocker.net does not serve any traffic on http other than a 301 redirect to https, that will never change. |
|
These wget lines in this script are downloading bash source and patches. I believe it is another script that uses curl to pipe into bash. |
|
Ahh - I took at look at the commit diff now. Maybe it would be better to ask the user before the script continues, something like: "We've detected that cpanel is installed on your system. In order to continue, we need to install a newer version of wget on your system. Is that okay? [n]" We don't have any documentation on the website about touching other programs, bash being the only exception. Might be a good idea to have a disclaimer. |
|
I believe a message would be great, since I know many people just copy/paste this into their servers and expect it to work, as you've seen through the comments made by users using this script. The issue I had was that many servers didn't have HTTPS support for WGET, so I was getting many errors while downloading all patches, and I had to reinstall wget with the needed support. This was just a quick fix since HTTPS support for WGET can be good in many ways. Another way would be to change the "wget -N" command into a "curl", but either ways I would add a few checks to see if the user actually have those commands/libraries available before executing them to prevent errors. Let me know if you want me to do some changes and add the message you suggested for cPanel users or if you want another solution you might have in mind. On a side note I would even check the OS the user is running and fix the libraries accordingly. |
|
I toyed with changing all wget lines to curl. It works, but the output just isn't pretty. At this point, just to get a fix in place, I'm leaning towards printing an error with a prompt for the user to approve having the script reinstall wget (defaulting to N). @sysrenan, I see you have |
|
Great. I'll test the output. As far as the --nodeps that is to remove just wget and nothing else, all cPanel server is sure to have openssl already installed as they deal alot with SSL, specially on the WHM (admin) panel. So we should be fine there. And, I believe that is actually their recommended way to remove it and install from YUM. |
|
Have you tried adding --silent to curl to cleanup the output? ;) 👍 |
|
@wreiske I did try adding |
|
How about something like this: Maybe a message before this starts, something like, "Downloading bash-4.3.tar.gz..". |
This will check if the server is running cPanel, then it will check if WGET has HTTPS support, if it doesn't it will remove the current WGET RPM and install it from YUM.