Plugin Directory

Changeset 2946395


Ignore:
Timestamp:
08/02/2023 06:42:46 AM (2 years ago)
Author:
speedify
Message:

Releasing version 3.6.1

Location:
auto-install-free-ssl
Files:
277 added
12 edited

Legend:

Unmodified
Added
Removed
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Acme/AcmeV2.php

    r2905766 r2946395  
    186186                if ( empty($response2['challenges']) ) {
    187187                    /* translators: %s: A domain name, e.g., example.com */
    188                     $msg = sprintf( __( "Challenge for %s is not available. Whole response:", 'auto-install-free-ssl' ), $domain ) . " <br />\n";
     188                    //$msg = sprintf(__("Challenge for %s is not available. Whole response:", 'auto-install-free-ssl'), $domain) . " <br />\n";
     189                    $msg = sprintf( "Challenge for %s is not available. Whole response:", $domain ) . " <br />\n";
     190                    //since 3.6.1, Don't translate this error message.
    189191                   
    190192                    if ( $this->logger->is_cli() ) {
     
    212214                        //"dns-01" is NOT available
    213215                        /* translators: %s: A domain name, e.g., example.com */
    214                         $msg = sprintf( __( "Neither 'HTTP-01' nor 'DNS-01' challenge for %s is available. Whole response:", 'auto-install-free-ssl' ), $domain ) . " <br />\n";
     216                        //$msg = sprintf(__("Neither 'HTTP-01' nor 'DNS-01' challenge for %s is available. Whole response:", 'auto-install-free-ssl'), $domain) . " <br />\n";
     217                        $msg = sprintf( "Neither 'HTTP-01' nor 'DNS-01' challenge for %s is available. Whole response:", $domain ) . " <br />\n";
     218                        //since 3.6.1, Don't translate this error message.
    215219                       
    216220                        if ( $this->logger->is_cli() ) {
     
    457461        // waiting loop
    458462        do {
     463           
    459464            if ( !$ended ) {
    460465                // send request to challenge
     
    464469                    'token'            => $challenge['token'],
    465470                ] );
    466             }
     471                // START since 3.6.1 (added July 16, 2023)
     472                /*if($this->logger->is_cli()) {
     473                                    $result_text = print_r($result, true);
     474                                }
     475                                else{
     476                                    $result_text = '<pre>'. print_r($result, true) .'</pre>';
     477                                }
     478               
     479                                $this->logger->log("Let's Encrypt server response (Challenge result): <br />\n". $result_text);*/
     480                // END since 3.6.1 (added July 16, 2023)
     481            }
     482           
    467483           
    468484            if ( empty($result['status']) || 'invalid' === $result['status'] || 400 === $result['status'] || 404 === $result['status'] ) {
    469485                $ended = true;
    470                 $msg = "<br />\n " . __( "Content of", 'auto-install-free-ssl' ) . " " . $challenge['url'] . "  <br />\n";
     486                //$msg = "<br />\n " . __( "Content of", 'auto-install-free-ssl' ) . " " . $challenge['url'] . "  <br />\n";
     487                $msg = "<br />\n Content of " . $challenge['url'] . "  <br />\n";
     488                //since 3.6.1, Don't translate this error message.
    471489                $challenge_url_content = $this->client->get( $challenge['url'] );
    472490               
     
    478496               
    479497                $this->logger->log_v2( 'error', $msg );
    480                 $msg = __( "Verification ended with an error", 'auto-install-free-ssl' ) . ": <br />\n";
     498                //$msg = __( "Verification ended with an error", 'auto-install-free-ssl' ) . ": <br />\n";
     499                $msg = "Verification ended with an error: <br />\n";
     500                //since 3.6.1, Don't translate this error message.
    481501               
    482502                if ( $this->logger->is_cli() ) {
     
    574594        }
    575595       
     596       
    576597        if ( 200 !== $this->client->getLastCode() ) {
    577             //throw new \RuntimeException("Invalid response code: ".$this->client->getLastCode().", ".json_encode($result));
    578             $this->logger->exception_sse_friendly( __( "Invalid response code", 'auto-install-free-ssl' ) . ": " . $this->client->getLastCode() . ", " . json_encode( $result ), __FILE__, __LINE__ );
    579         }
     598            //$this->logger->exception_sse_friendly(__( "Invalid response code", 'auto-install-free-ssl' ) . ": " . $this->client->getLastCode().", ".json_encode($result), __FILE__, __LINE__);
     599            $this->logger->exception_sse_friendly( "Invalid response code: " . $this->client->getLastCode() . ", " . json_encode( $result ), __FILE__, __LINE__ );
     600            //since 3.6.1, Don't translate exception message
     601        }
     602       
    580603        $location = $result['certificate'];
    581604        // waiting loop
     
    596619                break;
    597620            } else {
    598                 //throw new \RuntimeException("Can't get certificate: HTTP code ".$this->client->getLastCode());
    599                 $this->logger->exception_sse_friendly( __( "Can't get a certificate: HTTP code", 'auto-install-free-ssl' ) . ": " . $this->client->getLastCode(), __FILE__, __LINE__ );
    600             }
    601        
    602         }
     621                //$this->logger->exception_sse_friendly(__( "Can't get a certificate: HTTP code", 'auto-install-free-ssl' ) . ": ". $this->client->getLastCode(), __FILE__, __LINE__);
     622                $this->logger->exception_sse_friendly( "Can't get a certificate: HTTP code: " . $this->client->getLastCode(), __FILE__, __LINE__ );
     623                //since 3.6.1, Don't translate exception message.
     624            }
     625       
     626        }
     627       
    603628        if ( empty($certificates) ) {
    604             //throw new \RuntimeException("No certificates generated");
    605             $this->logger->exception_sse_friendly( __( "No certificates generated", 'auto-install-free-ssl' ), __FILE__, __LINE__ );
    606         }
     629            //$this->logger->exception_sse_friendly(__( "No certificates generated", 'auto-install-free-ssl' ), __FILE__, __LINE__);
     630            $this->logger->exception_sse_friendly( "No certificates generated", __FILE__, __LINE__ );
     631            //since 3.6.1, Don't translate exception message.
     632        }
     633       
    607634        $this->logger->log( __( "Saving Certificate (CRT) certificate.pem", 'auto-install-free-ssl' ) );
    608635        file_put_contents( $domainPath . DS . 'certificate.pem', $certificates[0] );
     
    808835                } else {
    809836                    /* translators: %1$s: A directory path, e.g., /home/username/ssl-cert; %2$s: A kid (characters) generated by Let's Encrypt */
    810                     $error_text = sprintf( __( 'Error creating kid.txt file. Please create a text file with the filename \'kid.txt\' in this path %1$s and paste the following text in it: %2$s Then try again.', 'auto-install-free-ssl' ), "<strong>" . \dirname( $this->accountKeyPath ) . "</strong>", "<pre>" . $this->kid . "</pre>" );
    811                     $this->logger->log_v2( 'error', $error_text . " " . __( "Closing the connection", 'auto-install-free-ssl' ), [
     837                    //$error_text = sprintf(__( 'Error creating kid.txt file. Please create a text file with the filename \'kid.txt\' in this path %1$s and paste the following text in it: %2$s Then try again.', 'auto-install-free-ssl' ), "<strong>" . \dirname($this->accountKeyPath) . "</strong>", "<pre>" . $this->kid . "</pre>");
     838                    //$this->logger->log_v2('error', $error_text . " " . __( "Closing the connection", 'auto-install-free-ssl' ), ['event' => 'exit']);
     839                    $error_text = sprintf( 'Error creating kid.txt file. Please create a text file with the filename \'kid.txt\' in this path %1$s and paste the following text in it: %2$s Then try again.', "<strong>" . \dirname( $this->accountKeyPath ) . "</strong>", "<pre>" . $this->kid . "</pre>" );
     840                    $this->logger->log_v2( 'error', $error_text . " Closing the connection", [
    812841                        'event' => 'exit',
    813842                    ] );
     843                    //since 3.6.1, Don't translate this error message.
    814844                    $return_array['error_text'] = $error_text;
    815845                    $return_array['proceed'] = false;
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Acme/Client.php

    r2905766 r2946395  
    8282        }
    8383        $response = curl_exec( $handle );
    84         if ( curl_errno( $handle ) ) {
    85             //throw new \RuntimeException("Curl: ".curl_error($handle));
    86             $this->logger->exception_sse_friendly( "Curl: " . curl_error( $handle ), __FILE__, __LINE__ );
     84        $error_number = curl_errno( $handle );
     85        //@since 3.6.1
     86        if ( $error_number ) {
     87            $this->logger->exception_sse_friendly( "cURL error {$error_number}: " . curl_error( $handle ), __FILE__, __LINE__ );
    8788        }
    8889        $header_size = curl_getinfo( $handle, CURLINFO_HEADER_SIZE );
     
    105106            //Failed
    106107            /* translators: %d: A number i.e., HTTP status code. ("Let's Encrypt" is a nonprofit SSL certificate authority.) */
    107             $this->logger->log_v2( 'error', sprintf( __( "Sorry, the Let's Encrypt™ server response (%d) is unexpected. The complete server response is given below.", 'auto-install-free-ssl' ), $this->lastCode ) );
     108            //$this->logger->log_v2('error', sprintf(__("Sorry, the Let's Encrypt™ server response (%d) is unexpected. The complete server response is given below.", 'auto-install-free-ssl'), $this->lastCode));
     109            $this->logger->log_v2( 'error', sprintf( "Sorry, the Let's Encrypt™ server response (%d) is unexpected. The complete server response is given below.", $this->lastCode ) );
     110            //since 3.6.1, Don't translate this error message.
    108111           
    109112            if ( $this->logger->is_cli() ) {
    110113                $this->logger->log_v2( 'error', print_r( $result, true ) );
    111                 die( __( "Closing the connection", 'auto-install-free-ssl' ) );
     114                //die(__( "Closing the connection", 'auto-install-free-ssl' ));
     115                die( "Closing the connection" );
     116                //since 3.6.1, Don't translate this error message.
    112117            } else {
    113118                $this->logger->log_v2( 'error', '<pre>' . print_r( $result, true ) . '</pre>' );
    114                 $this->logger->log_v2( 'error', __( "Closing the connection", 'auto-install-free-ssl' ), [
     119                //$this->logger->log_v2('error', __( "Closing the connection", 'auto-install-free-ssl' ), ['event' => 'exit']);
     120                $this->logger->log_v2( 'error', "Closing the connection", [
    115121                    'event' => 'exit',
    116122                ] );
     123                //since 3.6.1, Don't translate this error message.
     124            }
     125       
     126        } else {
     127           
     128            if ( get_option( 'aifs_log_all_ca_server_response' ) ) {
     129                //since 3.6.1
     130                $result_text = '<pre>' . (( is_array( $result ) ? print_r( $result, true ) : $result )) . '</pre>';
     131                $this->logger->log( sprintf( "Let's Encrypt™ server response (%d) details is given below", $this->lastCode ) . ": <br />\n" . $result_text );
    117132            }
    118133       
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Acme/Factory.php

    r2934344 r2946395  
    202202       
    203203        if ( $res === false ) {
    204             $error = __( "Could not generate key pair! Check your OpenSSL configuration. Got this OpenSSL Error: ", 'auto-install-free-ssl' ) . PHP_EOL;
     204            //$error = __( "Could not generate key pair! Check your OpenSSL configuration. Got this OpenSSL Error: ", 'auto-install-free-ssl' ) . PHP_EOL;
     205            $error = "Could not generate key pair! Check your OpenSSL configuration. Got this OpenSSL Error: " . PHP_EOL;
     206            //since 3.6.1, Don't translate exception message.
    205207            while ( $message = openssl_error_string() ) {
    206208                $error .= $message . PHP_EOL;
     
    218220        ) ) {
    219221            //throw new \RuntimeException("Key export failed!");
    220             $error = __( "RSA keypair export failed!! Error: ", 'auto-install-free-ssl' ) . PHP_EOL;
     222            //$error = __( "RSA keypair export failed!! Error: ", 'auto-install-free-ssl' ) . PHP_EOL;
     223            $error = "RSA keypair export failed!! Error: " . PHP_EOL;
     224            //since 3.6.1, Don't translate exception message.
    221225            while ( $message = openssl_error_string() ) {
    222226                $error .= $message . PHP_EOL;
     
    229233            @mkdir( $outputDirectory, 0700, true );
    230234        }
     235       
    231236        if ( !is_dir( $outputDirectory ) ) {
    232237            //throw new \RuntimeException("Can't create directory ${outputDirectory}. Please manually create the directory in your certificate directory and set permission 0700 and try again.");
    233238            /* translators: %s: A directory path */
    234             $this->logger->exception_sse_friendly( sprintf( __( "Can't create directory %s. Please manually create the directory in your certificate directory, set permission 0700, and try again.", 'auto-install-free-ssl' ), $outputDirectory ), __FILE__, __LINE__ );
    235         }
     239            //$this->logger->exception_sse_friendly(sprintf(__("Can't create directory %s. Please manually create the directory in your certificate directory, set permission 0700, and try again.", 'auto-install-free-ssl'), $outputDirectory), __FILE__, __LINE__);
     240            $this->logger->exception_sse_friendly( sprintf( "Can't create directory %s. Please manually create the directory in your certificate directory, set permission 0700, and try again.", $outputDirectory ), __FILE__, __LINE__ );
     241            //since 3.6.1, Don't translate exception message.
     242        }
     243       
    236244        file_put_contents( $outputDirectory . DS . 'private.pem', $privateKey );
    237245        file_put_contents( $outputDirectory . DS . 'public.pem', $details['key'] );
     
    294302            'digest_alg' => 'sha256',
    295303        ] );
     304       
    296305        if ( !$csr ) {
    297306            //throw new \RuntimeException("CSR couldn't be generated! ".openssl_error_string());
    298             $this->logger->exception_sse_friendly( __( "CSR couldn't be generated!", 'auto-install-free-ssl' ) . " " . openssl_error_string(), __FILE__, __LINE__ );
    299         }
     307            //$this->logger->exception_sse_friendly(__( "CSR couldn't be generated!", 'auto-install-free-ssl' ) . " ". openssl_error_string(), __FILE__, __LINE__);
     308            $this->logger->exception_sse_friendly( "CSR couldn't be generated! " . openssl_error_string(), __FILE__, __LINE__ );
     309            //since 3.6.1, Don't translate exception message.
     310        }
     311       
    300312        openssl_csr_export( $csr, $csr );
    301313        fclose( $tmpConf );
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Admin/AdminNotice.php

    r2934344 r2946395  
    238238                /* translators: %s: Name of the SSL certificate authority, e.g., Let's Encrypt */
    239239                $html .= '<span style="font-size: small;">(' . sprintf( __( "The validity of %s free SSL is 90 days. They recommend renewing 30 days before expiry.", 'auto-install-free-ssl' ), $issuerShort ) . ')</span><!-- <br /><strong>~' . AIFS_NAME . '</strong>-->
    240                               <br /><span style="font-size: medium; line-height: 3em;">' . __( "Tired of renewing & installing SSL certificates manually every 60 days? Try Premium Version, and the plugin will do it automatically!", 'auto-install-free-ssl' ) . '</span></p>
     240                              <br /><span style="font-size: medium; line-height: 2em;">' . __( "Tired of renewing & installing SSL certificates manually every 60 days? Try Premium Version, and the plugin will do it automatically!", 'auto-install-free-ssl' ) . '</span></p>
    241241                            </div>
    242242                            <div style="margin-left: 8%; margin-top: -1%; margin-bottom: -2%;">
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Admin/Factory.php

    r2934344 r2946395  
    5959    public function getSubDirectories( $dirPath )
    6060    {
     61       
    6162        if ( !is_dir( $dirPath ) ) {
    6263            //throw new InvalidArgumentException("${dirPath} must be a directory");
    6364            /* translators: %s: A directory path */
    64             $this->logger->exception_sse_friendly( sprintf( __( "%s must be a directory", 'auto-install-free-ssl' ), $dirPath ), __FILE__, __LINE__ );
    65         }
     65            //$this->logger->exception_sse_friendly(sprintf(__("%s must be a directory", 'auto-install-free-ssl'), $dirPath), __FILE__, __LINE__);
     66            $this->logger->exception_sse_friendly( sprintf( "%s must be a directory", $dirPath ), __FILE__, __LINE__ );
     67            //since 3.6.1, Don't translate exception message.
     68        }
     69       
    6670        if ( '/' !== substr( $dirPath, \strlen( $dirPath ) - 1, 1 ) ) {
    6771            $dirPath .= '/';
     
    358362                curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
    359363                $response = curl_exec( $handle );
     364                $error_number = curl_errno( $handle );
     365                //@since 3.6.1
     366               
     367                if ( $error_number ) {
     368                    $error_text = "cURL error {$error_number}: " . curl_error( $handle );
     369                    $error_text .= "\n\n File: " . __FILE__ . "\n Line number: " . __LINE__ . "\n\n";
     370                    $this->logger->write_log( 'error', $error_text, [
     371                        'event' => 'ping',
     372                    ] );
     373                }
     374               
    360375                $effective_url = curl_getinfo( $handle, CURLINFO_EFFECTIVE_URL );
    361376                $redirect_url = curl_getinfo( $handle, CURLINFO_REDIRECT_URL );
    362377                $http_status_code = curl_getinfo( $handle, CURLINFO_HTTP_CODE );
    363                 $error = curl_errno( $handle );
    364378                curl_close( $handle );
    365379                $checkURL = $this->checkcPanelInUrl( $effective_url );
     
    725739            @mkdir( AIFS_UPLOAD_DIR, 0700, true );
    726740        }
     741       
    727742        if ( !is_dir( AIFS_UPLOAD_DIR ) ) {
    728743            //throw new \RuntimeException("Can't create directory '".AIFS_UPLOAD_DIR."'. Please manually create it, set permission 0755 and try again.");
    729744            /* translators: %1$s: A directory path, e.g., /home/user/public_html, %2$s: Directory permissions number, e.g., 0700 */
    730             $this->logger->exception_sse_friendly( sprintf( __( 'Can not create the directory %1$s. Please manually create it, set permission %2$s, and try again.', 'auto-install-free-ssl' ), AIFS_UPLOAD_DIR, '0700' ), __FILE__, __LINE__ );
    731         }
     745            //$this->logger->exception_sse_friendly(sprintf(__('Can not create the directory %1$s. Please manually create it, set permission %2$s, and try again.', 'auto-install-free-ssl'), AIFS_UPLOAD_DIR, '0700'), __FILE__, __LINE__);
     746            $this->logger->exception_sse_friendly( sprintf( 'Can not create the directory %1$s. Please manually create it, set permission %2$s, and try again.', AIFS_UPLOAD_DIR, '0700' ), __FILE__, __LINE__ );
     747            //since 3.6.1, Don't translate exception message.
     748        }
     749       
    732750       
    733751        if ( is_writable( AIFS_UPLOAD_DIR ) ) {
     
    745763       
    746764        } else {
     765           
    747766            if ( !is_writable( AIFS_UPLOAD_DIR ) ) {
    748767                //throw new \RuntimeException("The directory '".AIFS_UPLOAD_DIR."' is not writable. Please manually set permission 0755 or 0777 to this directory and try again.");
    749768                /* translators: %s: A directory path, e.g., /home/user/public_html */
    750                 $this->logger->exception_sse_friendly( sprintf( __( "The directory '%s' is not writable. Please manually set the permission 0755 or 0777 to this directory and try again.", 'auto-install-free-ssl' ), AIFS_UPLOAD_DIR ), __FILE__, __LINE__ );
    751             }
     769                //$this->logger->exception_sse_friendly(sprintf(__("The directory '%s' is not writable. Please manually set the permission 0755 or 0777 to this directory and try again.", 'auto-install-free-ssl'), AIFS_UPLOAD_DIR), __FILE__, __LINE__);
     770                $this->logger->exception_sse_friendly( sprintf( "The directory '%s' is not writable. Please manually set the permission 0755 or 0777 to this directory and try again.", AIFS_UPLOAD_DIR ), __FILE__, __LINE__ );
     771                //since 3.6.1, Don't translate exception message.
     772            }
     773       
    752774        }
    753775       
     
    807829        $file = ".htaccess";
    808830        if ( !file_exists( $dir_path . DS . $file ) && (aifs_server_software() == "apache" || aifs_server_software() === false) ) {
     831           
    809832            if ( !file_put_contents( $dir_path . DS . $file, $data ) ) {
    810833                //echo "<pre>$data</pre>";
    811834                //throw new \RuntimeException("Can't create .htaccess file in the directory '".$dir_path."'. Please manually create it, and paste the above code in it.");
     835                /*$this->logger->exception_sse_friendly(sprintf(
     836                        /* translators: %1$s: A file name; %2$s: A directory path; %3$s: Code that will be written in the file */
     837                /*__('Can\'t create the \'%1$s\' file in the directory \'%2$s\'. Please manually create it, and paste this code into it: %3$s', 'auto-install-free-ssl'),
     838                            $file,
     839                            $dir_path,
     840                            "<pre>" . htmlspecialchars($data) . "</pre>"
     841                        ), __FILE__, __LINE__);*/
    812842                $this->logger->exception_sse_friendly( sprintf(
    813                     /* translators: %1$s: A file name; %2$s: A directory path; %3$s: Code that will be written in the file */
    814                     __( 'Can\'t create the \'%1$s\' file in the directory \'%2$s\'. Please manually create it, and paste this code into it: %3$s', 'auto-install-free-ssl' ),
     843                    'Can\'t create the \'%1$s\' file in the directory \'%2$s\'. Please manually create it, and paste this code into it: %3$s',
    815844                    $file,
    816845                    $dir_path,
    817846                    "<pre>" . htmlspecialchars( $data ) . "</pre>"
    818847                ), __FILE__, __LINE__ );
    819             }
     848                //since 3.6.1, Don't translate exception message.
     849            }
     850       
    820851        }
    821852    }
     
    831862        $file = "web.config";
    832863        if ( !file_exists( $dir_path . DS . $file ) && (aifs_server_software() == "ms-iis" || aifs_server_software() === false) ) {
     864           
    833865            if ( !file_put_contents( $dir_path . DS . $file, $data ) ) {
    834866                //echo "<pre>$data</pre>";
    835867                //throw new \RuntimeException("Can't create .htaccess file in the directory '".$dir_path."'. Please manually create it, and paste the above code in it.");
     868                /*$this->logger->exception_sse_friendly(sprintf(
     869                        /* translators: %1$s: A file name; %2$s: A directory path; %3$s: Code that will be written in the file */
     870                /*__('Can\'t create the \'%1$s\' file in the directory \'%2$s\'. Please manually create it, and paste this code into it: %3$s', 'auto-install-free-ssl'),
     871                            $file,
     872                            $dir_path,
     873                            "<pre>" . htmlspecialchars($data, ENT_XML1) . "</pre>"
     874                        ), __FILE__, __LINE__);*/
    836875                $this->logger->exception_sse_friendly( sprintf(
    837                     /* translators: %1$s: A file name; %2$s: A directory path; %3$s: Code that will be written in the file */
    838                     __( 'Can\'t create the \'%1$s\' file in the directory \'%2$s\'. Please manually create it, and paste this code into it: %3$s', 'auto-install-free-ssl' ),
     876                    'Can\'t create the \'%1$s\' file in the directory \'%2$s\'. Please manually create it, and paste this code into it: %3$s',
    839877                    $file,
    840878                    $dir_path,
    841879                    "<pre>" . htmlspecialchars( $data, ENT_XML1 ) . "</pre>"
    842880                ), __FILE__, __LINE__ );
    843             }
     881                //since 3.6.1, Don't translate exception message.
     882            }
     883       
    844884        }
    845885    }
     
    903943        // Get response
    904944        $response = curl_exec( $curlInit );
     945        $error_number = curl_errno( $curlInit );
     946        //@since 3.6.1
     947       
     948        if ( $error_number ) {
     949            $error_text = "cURL error {$error_number}: " . curl_error( $curlInit );
     950            $error_text .= "\n\n File: " . __FILE__ . "\n Line number: " . __LINE__ . "\n\n";
     951            $this->logger->write_log( 'error', $error_text, [
     952                'event' => 'ping',
     953            ] );
     954        }
     955       
    905956        //$http_code = curl_getinfo($curlInit, CURLINFO_HTTP_CODE);
    906957        // Close a cURL session
     
    11441195        curl_setopt( $ch, CURLOPT_HEADER, true );
    11451196        $result = curl_exec( $ch );
     1197        $error_number = curl_errno( $ch );
     1198        //@since 3.6.1
     1199       
     1200        if ( $error_number ) {
     1201            $error_text = "cURL error {$error_number}: " . curl_error( $ch );
     1202            $error_text .= "\n\n File: " . __FILE__ . "\n Line number: " . __LINE__ . "\n\n";
     1203            $this->logger->write_log( 'error', $error_text, [
     1204                'event' => 'ping',
     1205            ] );
     1206        }
     1207       
    11461208        $info = curl_getinfo( $ch );
    11471209        curl_close( $ch );
     
    12631325        curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );
    12641326        curl_exec( $ch );
     1327        $error_number = curl_errno( $ch );
     1328        //@since 3.6.1
     1329       
     1330        if ( $error_number ) {
     1331            $error_text = "cURL error {$error_number}: " . curl_error( $ch );
     1332            $error_text .= "\n\n File: " . __FILE__ . "\n Line number: " . __LINE__ . "\n\n";
     1333            $this->logger->write_log( 'error', $error_text, [
     1334                'event' => 'ping',
     1335            ] );
     1336        }
     1337       
    12651338        $http_code = curl_getinfo( $ch, CURLINFO_HTTP_CODE );
    12661339        curl_close( $ch );
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Admin/ForceSSL.php

    r2905766 r2946395  
    473473        $subject = sprintf( __( '\'%1$s\' has activated Force HTTPS on your website %2$s.', 'auto-install-free-ssl' ), AIFS_NAME, aifs_get_domain( false ) );
    474474        $headers[] = 'MIME-Version: 1.0';
    475         $headers[] = 'Content-type: text/html; charset=UTF-8';
     475        $headers[] = 'Content-Type: text/html; charset=UTF-8';
    476476        $headers[] = 'From:wordpress@' . aifs_get_domain();
    477477        //Email body
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Admin/GenerateSSLmanually.php

    r2921218 r2946395  
    12041204                    /* translators: %1$d: A number; %2$d: Another number; %3$s: A domain name, e.g., example.com */
    12051205                    $text = sprintf(__('The number of authorizations: %1$d. But the number of validated domains: %2$d. Sorry, the SSL certificate can not be issued to %3$s.', 'auto-install-free-ssl'), count( $this->return_array_step1['response']['authorizations'] ), $number_of_validated_domains, $this->return_array_step1['domains_array'][0]) . " ";
     1206                    $text_for_log = sprintf('The number of authorizations: %1$d. But the number of validated domains: %2$d. Sorry, the SSL certificate can not be issued to %3$s.', count( $this->return_array_step1['response']['authorizations'] ), $number_of_validated_domains, $this->return_array_step1['domains_array'][0]) . " "; //since 3.6.1, Don't translate this error message.
    12061207
    12071208                    $difference = \count( $this->return_array_step1['response']['authorizations'] ) - $number_of_validated_domains;
     
    12101211                        /* translators: %d: A plural number */
    12111212                        $text .= sprintf(__('%d domains were not validated.', 'auto-install-free-ssl'), $difference);
     1213                        $text_for_log .= sprintf('%d domains were not validated.', $difference); //since 3.6.1, Don't translate this error message.
    12121214                    }
    12131215                    else{
    12141216                        /* translators: %d: A singular number, i.e., 1 */
    12151217                        $text .= sprintf(__('%d domain was not validated.', 'auto-install-free-ssl'), $difference);
     1218                        $text_for_log .= sprintf('%d domain was not validated.', $difference); //since 3.6.1, Don't translate this error message.
    12161219                    }
    12171220
    1218                     $this->logger->log_v2( 'error', $text );
     1221                    $this->logger->log_v2( 'error', $text_for_log );
    12191222
    12201223                    //save error msg in a variable
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Controller.php

    r2934344 r2946395  
    9292                            $domains_online[] = $domain;
    9393                        } else {
     94                            /*$this->logger->log( sprintf(
     95                              /* translators: %1$s: A IP address, e.g., 192.168.1.1, %2$s: A domain name, e.g., example.com, %3$s: Another IP address, e.g., 10.0.0.1 */
     96                            /* __( 'The IP of this server is %1$s. But %2$s points to different IP (%3$s). So, skipping it.', 'auto-install-free-ssl' ),
     97                                $ip_of_this_server,
     98                                $domain,
     99                                $dns[0]['ip']
     100                               ) );*/
    94101                            $this->logger->log( sprintf(
    95                                 /* translators: %1$s: A IP address, e.g., 192.168.1.1, %2$s: A domain name, e.g., example.com, %3$s: Another IP address, e.g., 10.0.0.1 */
    96                                 __( 'The IP of this server is %1$s. But %2$s points to different IP (%3$s). So, skipping it.', 'auto-install-free-ssl' ),
     102                                'The IP of this server is %1$s. But %2$s points to different IP (%3$s). So, skipping it.',
    97103                                $ip_of_this_server,
    98104                                $domain,
    99105                                $dns[0]['ip']
    100106                            ) );
     107                            //since 3.6.1, Don't translate this soft error message.
    101108                        }
    102109                   
     
    108115                    //domain offline
    109116                    /* translators: %s: A domain name, e.g., example.com */
    110                     $this->logger->log( sprintf( __( "%s is offline. Skipping it.", 'auto-install-free-ssl' ), $domain ) );
     117                    //$this->logger->log( sprintf(__( "%s is offline. Skipping it.", 'auto-install-free-ssl' ), $domain) );
     118                    $this->logger->log( sprintf( "%s is offline. Skipping it.", $domain ) );
     119                    //since 3.6.1, Don't translate this soft error message.
    111120                }
    112121           
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Email.php

    r2934344 r2946395  
    184184                $headers = [];
    185185                $headers[] = 'MIME-Version: 1.0';
    186                 $headers[] = 'Content-type: text/html; charset=iso-8859-1';
     186                //$headers[] = 'Content-type: text/html; charset=iso-8859-1';
     187                $headers[] = 'Content-Type: text/html; charset=UTF-8';
    187188                $headers[] = 'From:wordpress@' . aifs_get_domain();
    188189                // Send the email
  • auto-install-free-ssl/trunk/FreeSSLAuto/src/Logger.php

    r2934344 r2946395  
    8686            @mkdir( $log_directory, 0700, true );
    8787        }
     88       
    8889        if ( !is_dir( $log_directory ) ) {
    8990            //throw new \RuntimeException("Can't create directory '$log_directory'. Please manually create this directory, set permission 0755 and try again.");
     91            /*$this->exception_sse_friendly(
     92              /* translators: %s: A directory path */
     93            /* sprintf(__( "Can't create directory '%s'. Please manually create this directory, set permission 0755, and try again.", 'auto-install-free-ssl' ), $log_directory),
     94                __FILE__,
     95                __LINE__,
     96                false
     97               );*/
    9098            $this->exception_sse_friendly(
    9199                /* translators: %s: A directory path */
    92                 sprintf( __( "Can't create directory '%s'. Please manually create this directory, set permission 0755, and try again.", 'auto-install-free-ssl' ), $log_directory ),
     100                sprintf( "Can't create directory '%s'. Please manually create this directory, set permission 0755, and try again.", $log_directory ),
    93101                __FILE__,
    94102                __LINE__,
    95103                false
    96104            );
    97         }
     105            //since 3.6.1, Don't translate exception message.
     106        }
     107       
    98108        /*if(!file_exists($log_directory . DS . ".htaccess")){
    99109              if(!file_put_contents($log_directory . DS . ".htaccess", "Order deny,allow\nDeny from all")){
     
    132142    )
    133143    {
    134         $exp_text .= "\n\n" . __( "File:", 'auto-install-free-ssl' ) . " " . $file_name . "\n" . __( "Line number:", 'auto-install-free-ssl' ) . " " . $line_number . "\n\n";
     144        //$exp_text .= "\n\n". __( "File:", 'auto-install-free-ssl' ) ." ".$file_name . "\n". __( "Line number:", 'auto-install-free-ssl' ) ." ". $line_number . "\n\n";
     145        $exp_text .= "\n\n File: " . $file_name . "\n Line number: " . $line_number . "\n\n";
     146        //since 3.6.1, Don't translate exception message
    135147       
    136148        if ( $this->is_cli() ) {
     149           
    137150            if ( $write_in_log_file ) {
    138                 $this->write_log( 'error', current_time( 'mysql' ) . " [error] " . $exp_text . "\n\n" . __( "Connection closed", 'auto-install-free-ssl' ) . "\n", [
     151                //$this->write_log('error', current_time('mysql')." [error] ". $exp_text ."\n\n". __( "Connection closed", 'auto-install-free-ssl' ) ."\n", ['event' => 'exit']);
     152                $this->write_log( 'error', current_time( 'mysql' ) . " [error] " . $exp_text . "\n\n Connection closed \n", [
    139153                    'event' => 'exit',
    140154                ] );
     155                //since 3.6.1, Don't translate exception message
    141156            }
     157           
    142158            throw new \RuntimeException( $exp_text );
    143159            /*echo current_time('mysql')." [error] ".$exp_text;
  • auto-install-free-ssl/trunk/auto-install-free-ssl.php

    r2934344 r2946395  
    77 * Plugin URI:  https://freessl.tech
    88 * Description: Generate & install Free SSL Certificates, activate force HTTPS redirect with one click to fix insecure links & mixed content warnings, and get automatic Renewal Reminders.
    9  * Version:     3.6.0
     9 * Version:     3.6.1
    1010 * Requires at least: 4.1
    1111 * Requires PHP:      5.6
  • auto-install-free-ssl/trunk/readme.txt

    r2934344 r2946395  
    66Tags: free ssl,free ssl certificate,ssl certificate,https,force ssl
    77Requires at least: 4.1
    8 Tested up to: 6.2
    9 Stable tag: 3.6.0
     8Tested up to: 6.3
     9Stable tag: 3.6.1
    1010Requires PHP: 5.6
    1111Development location: https://freessl.tech
Note: See TracChangeset for help on using the changeset viewer.