Skip to content
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

makeself --ssl-pass-src from header unusable #192

Open
arrjay opened this issue Nov 24, 2019 · 1 comment
Open

makeself --ssl-pass-src from header unusable #192

arrjay opened this issue Nov 24, 2019 · 1 comment

Comments

@arrjay
Copy link

arrjay commented Nov 24, 2019

makeself's header checks if it can use openssl's password source flags by checking against $ENCRYPT, it should check against $COMPRESS to see if openssl was used to encrypt the archive here. other uses of the $ENCRYPT variable are also suspect.

@arrjay
Copy link
Author

arrjay commented Nov 24, 2019

this diff from a copy of the makeself header allows the argument to work:

diff --git a/support/ms/makeself-header.sh b/support/ms/makeself-header.sh
index 49bd7ea..f224c22 100755
--- a/support/ms/makeself-header.sh
+++ b/support/ms/makeself-header.sh
@@ -251,9 +251,9 @@ MS_Check()
 MS_Decompress()
 {
     if test x"\$decrypt_cmd" != x""; then
-        { eval "\$decrypt_cmd" || echo " ... Decryption failed." >&2; } | eval "$GUNZIP_CMD"
+        { eval "\$decrypt_cmd" || echo " ... Decryption failed." >&2; } | eval "$GUNZIP_CMD \$decrypt_opts"
     else
-        eval "$GUNZIP_CMD"
+        eval "$GUNZIP_CMD \$decrypt_opts"
     fi
     
     if test \$? -ne 0; then
@@ -417,11 +417,11 @@ EOLSM
        shift
        ;;
     --ssl-pass-src)
-       if test x"$ENCRYPT" != x"openssl"; then
+       if test x"$COMPRESS" != x"openssl"; then
            echo "Invalid option --ssl-pass-src: \$0 was not encrypted with OpenSSL!" >&2
            exit 1
        fi
-       decrypt_cmd="\$decrypt_cmd -pass \$2"
+       decrypt_opts="-pass \$2"
        if ! shift 2; then MS_Help; exit 1; fi
        ;;
     --)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant