0

With reference to ImpressPages - Unable to add plugin / themes ( version 4.2.7 - abt 2 years ago ) the problem still seems to be persistent ?

The relevant code from /Ip/Internal/Plugins/PluginDownloader.php is;

    $fileMd5 = md5_file($archivePath);
    $rsa = new \Crypt_RSA();
    $rsa->loadKey($this->publicKey);
    $rsa->setSignatureMode(CRYPT_RSA_SIGNATURE_PKCS1);
    $verified = $rsa->verify($fileMd5, base64_decode($signature));

    if (!$verified) {
        throw new \Ip\Exception('Plugin signature verification failed.');
    } 

RSA.php is available at ;

    `require_once IP_PHPSECLIB_DIR . 'Crypt/RSA.php'`

Commands md5_file, base64_decode run properly ( tested via simple test scripts ).

I tried to echo values of $rsa and $verified;

      echo'<pre>';var_dump($rsa);
      echo'<pre>';var_dump($verified);

but got "Unknown error. Please see logs."

Tried ;

    trigger_error("///////// RSA Obj  Is /////////// :- ".$rsa,    E_USER_WARNING );
    trigger_error("///////// Verified Is /////////// :- ".$verified, E_USER_WARNING );

but got the same "Unknown error. Please see logs."

As for the Logs ( hidden under Admin-> Menu -> System -> Log ), well they showed nothing.

Next, i tried https://www.impresspages.org/docs/log - ipLog() function but it doesnt say how we can use ipLog() to see values of variables such as $rsa , $verified to troubleshoot further.

So my question to any ImpressPages guru here is;

  • How do we inspect the values of $rsa, $verified ?
  • How to get impresspages to install plugins via the admin interface ? or is this feature broken for the past 2 years ?
Community
  • 1
  • 1
MarcoZen
  • 1,556
  • 22
  • 27
  • Hi, plugin / theme installation works for all those two years. I guess your PHP installation lacks some decryption algorithms / scripts and can't check if downloaded file is signed properly. The error message you are getting is not related directly to ImpressPages. So ipLog has nothing to do with it. Look at low level PHP logs or so. This error is shown to you by the library we use to check the signature. – Mangirdas Skripka Jul 11 '16 at 19:33
  • Mangirdas -1. from the code snippet, the encryption required is RSA based. That file is installed at that location as mentioned above. 2. The error message "Unknown error. Pls see logs" is from impresspages. 3. How do we echo or check values of $rsa, $verified with ipLog ? – MarcoZen Jul 12 '16 at 03:15
  • @MangirdasSkripka - From the code, the only decryption required is $verified = $rsa->verify($fileMd5, base64_decode($signature)); RSA right ? Anything else ? The code uses phpseclib which is very well supported in Linux boxes. – MarcoZen Jul 12 '16 at 03:19
  • @MangirdasSkripka - this is on a 13.2 opensuse box btw. Problem has been persistent in opensuse 12.1 , 12.2 ,13.1 distros too. – MarcoZen Jul 12 '16 at 03:23
  • @MangirdasSkripka - Apache error_logs show no error. – MarcoZen Jul 12 '16 at 03:24

1 Answers1

0

An easy solution would be to try different host.

Mangirdas Skripka
  • 1,647
  • 1
  • 15
  • 14