Back to top

Autore Topic: [RISOLTO]Registrazione sito: non funziona più  (Letto 6609 volte)

Offline Mozartino

  • Appassionato
  • ***
  • Post: 367
    • Mostra profilo
[RISOLTO]Registrazione sito: non funziona più
« il: 11 Nov 2013, 23:18:27 »
Salve.

Sul sito comprensivomontemurlo.gov.it fino a qualche giorno fa funzionava la richiesta d'iscrizione che gli utenti inviavano tramite questo form:
http://comprensivomontemurlo.gov.it/index.php/accesso-riservato?view=registration

Ultimamente gli utenti non riescono a registrarsi al sito e ricevono questo messaggio

Il seguente indirizzo del mittente non è valido: vincenzo.sellitto@comprensivomontemurlo.gov.itErrore server SMTP: 5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 a51sm29392035eeh.8 - gsmtp
Non ditemi che c'entra qualcosa l'aggiornamento alla versione 2.5.16...
Qualcuno può aiutarmi?

Grazie
« Ultima modifica: 12 Nov 2013, 09:51:16 da Mozartino »
Carpe Diem

adottauncane

  • Visitatore
Re:Registrazione sito: non funziona più
« Risposta #1 il: 11 Nov 2013, 23:25:01 »

Offline Mozartino

  • Appassionato
  • ***
  • Post: 367
    • Mostra profilo
Re:Registrazione sito: non funziona più
« Risposta #2 il: 11 Nov 2013, 23:40:12 »
Ciao Mozartino,
questo fatto?

http://forum.joomla.it/index.php?topic=222489.new#new

Penso d'averlo fatto ma leggo ancora questo messaggio d'errore

 
  • PLG_RECAPTCHA_ERROR_
Carpe Diem

adottauncane

  • Visitatore
Re:Registrazione sito: non funziona più
« Risposta #3 il: 11 Nov 2013, 23:56:11 »
Non saprei, non è nel file di lingua, quindi non so che errore sia. Controlla di nuovo il file modificato, le key privata e pubblica...

Offline Mozartino

  • Appassionato
  • ***
  • Post: 367
    • Mostra profilo
Re:Registrazione sito: non funziona più
« Risposta #4 il: 12 Nov 2013, 00:03:40 »
Non saprei, non è nel file di lingua, quindi non so che errore sia. Controlla di nuovo il file modificato, le key privata e pubblica...

Codice: [Seleziona]
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Captcha
 *
 * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

jimport('joomla.environment.browser');

/**
 * Recaptcha Plugin.
 * Based on the official recaptcha library( https://developers.google.com/recaptcha/docs/php )
 *
 * @package     Joomla.Plugin
 * @subpackage  Captcha
 * @since       2.5
 */
class plgCaptchaRecaptcha extends JPlugin
{
    const 
RECAPTCHA_API_SERVER "http://www.google.com/recaptcha/api";
    const 
RECAPTCHA_API_SECURE_SERVER "https://www.google.com/recaptcha/api";
    const 
RECAPTCHA_VERIFY_SERVER "api-verify.recaptcha.net";

    public function 
__construct($subject$config)
    {
        
parent::__construct($subject$config);
        
$this->loadLanguage();
    }

    
/**
     * Initialise the captcha
     *
     * @param    string    $id    The id of the field.
     *
     * @return    Boolean    True on success, false otherwise
     *
     * @since  2.5
     */
    
public function onInit($id)
    {
        
// Initialise variables
        
$lang        $this->_getLanguage();
        
$pubkey        $this->params->get('public_key''');
        
$theme        $this->params->get('theme''clean');

        if (
$pubkey == null || $pubkey == '')
        {
            throw new 
Exception(JText::_('PLG_RECAPTCHA_ERROR_NO_PUBLIC_KEY'));
        }

        
$server self::RECAPTCHA_API_SERVER;
        if (
JBrowser::getInstance()->isSSLConnection())
        {
            
$server self::RECAPTCHA_API_SECURE_SERVER;
        }

        
JHtml::_('script'$server.'/js/recaptcha_ajax.js');
        
$document JFactory::getDocument();
        
$document->addScriptDeclaration('window.addEvent(\'domready\', function() {
            Recaptcha.create("'
.$pubkey.'", "dynamic_recaptcha_1", {theme: "'.$theme.'",'.$lang.'tabindex: 0});});'
        
);

        return 
true;
    }

    
/**
     * Gets the challenge HTML
     *
     * @return  string  The HTML to be embedded in the form.
     *
     * @since  2.5
     */
    
public function onDisplay($name$id$class)
    {
        return 
'<div id="dynamic_recaptcha_1"></div>';
    }

    
/**
      * Calls an HTTP POST function to verify if the user's guess was correct
      *
      * @return  True if the answer is correct, false otherwise
      *
      * @since  2.5
      */
    
public function onCheckAnswer($code)
    {
        
// Initialise variables
        
$privatekey    $this->params->get('private_key');
        
$remoteip    JRequest::getVar('REMOTE_ADDR''''SERVER');
        
$challenge    JRequest::getString('recaptcha_challenge_field''');
        
$response    JRequest::getString('recaptcha_response_field''');;

        
// Check for Private Key
        
if (empty($privatekey))
        {
            
$this->_subject->setError(JText::_('PLG_RECAPTCHA_ERROR_NO_PRIVATE_KEY'));
            return 
false;
        }

        
// Check for IP
        
if (empty($remoteip))
        {
            
$this->_subject->setError(JText::_('PLG_RECAPTCHA_ERROR_NO_IP'));
            return 
false;
        }

        
// Discard spam submissions
        
if ($challenge == null || strlen($challenge) == || $response == null || strlen($response) == 0)
        {
            
$this->_subject->setError(JText::_('PLG_RECAPTCHA_ERROR_EMPTY_SOLUTION'));
            return 
false;
        }

        
$response $this->_recaptcha_http_post(self::RECAPTCHA_VERIFY_SERVER"/recaptcha/api/verify",
                                                array(
                                                    
'privatekey'    => $privatekey,
                                                    
'remoteip'        => $remoteip,
                                                    
'challenge'        => $challenge,
                                                    
'response'        => $response
                                                
)
                                          );

        
$answers explode("\n"$response[1]);

        if (
trim($answers[0]) == 'true') {
                return 
true;
        }
        else
        {
            
//@todo use exceptions here
            
$this->_subject->setError(JText::_('PLG_RECAPTCHA_ERROR_'.strtoupper(str_replace('-''_'$answers[1]))));
            return 
false;
        }
    }

    
/**
     * Encodes the given data into a query string format.
     *
     * @param   string  $data  Array of string elements to be encoded
     *
     * @return  string  Encoded request
     *
     * @since  2.5
     */
    
private function _recaptcha_qsencode($data)
    {
        
$req "";
        foreach (
$data as $key => $value)
        {
            
$req .= $key '=' urlencode(stripslashes($value)) . '&';
        }

        
// Cut the last '&'
        
$req rtrim($req'&');
        return 
$req;
    }

    
/**
     * Submits an HTTP POST to a reCAPTCHA server.
     *
     * @param   string  $host
     * @param   string  $path
     * @param   array   $data
     * @param   int     $port
     *
     * @return  array   Response
     *
     * @since  2.5
     */
    
private function _recaptcha_http_post($host$path$data$port 80)
    {
        
$req $this->_recaptcha_qsencode($data);

        
$http_request  "POST $path HTTP/1.0\r\n";
        
$http_request .= "Host: $host\r\n";
        
$http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n";
        
$http_request .= "Content-Length: " strlen($req) . "\r\n";
        
$http_request .= "User-Agent: reCAPTCHA/PHP\r\n";
        
$http_request .= "\r\n";
        
$http_request .= $req;

        
$response '';
        if ((
$fs = @fsockopen($host$port$errno$errstr10)) == false )
        {
            die(
'Could not open socket');
        }

        
fwrite($fs$http_request);

        while (!
feof($fs))
        {
            
// One TCP-IP packet
            
$response .= fgets($fs1160);
        }

        
fclose($fs);
        
$response explode("\r\n\r\n"$response2);

        return 
$response;
    }

    
/**
     * Get the language tag or a custom translation
     *
     * @return string
     *
     * @since  2.5
     */
    
private function _getLanguage()
    {
        
// Initialise variables
        
$language JFactory::getLanguage();

        
$tag explode('-'$language->getTag());
        
$tag $tag[0];
        
$available = array('en''pt''fr''de''nl''ru''es''tr');

        if (
in_array($tag$available))
        {
            return 
"lang : '" $tag "',";
        }
        
        
// If the default language is not available, let's search for a custom translation
        
if ($language->hasKey('PLG_RECAPTCHA_CUSTOM_LANG'))
        {
            
$custom[] ='custom_translations : {';
            
$custom[] ="\t".'instructions_visual : "' JText::_('PLG_RECAPTCHA_INSTRUCTIONS_VISUAL') . '",';
            
$custom[] ="\t".'instructions_audio : "' JText::_('PLG_RECAPTCHA_INSTRUCTIONS_AUDIO') . '",';
            
$custom[] ="\t".'play_again : "' JText::_('PLG_RECAPTCHA_PLAY_AGAIN') . '",';
            
$custom[] ="\t".'cant_hear_this : "' JText::_('PLG_RECAPTCHA_CANT_HEAR_THIS') . '",';
            
$custom[] ="\t".'visual_challenge : "' JText::_('PLG_RECAPTCHA_VISUAL_CHALLENGE') . '",';
            
$custom[] ="\t".'audio_challenge : "' JText::_('PLG_RECAPTCHA_AUDIO_CHALLENGE') . '",';
            
$custom[] ="\t".'refresh_btn : "' JText::_('PLG_RECAPTCHA_REFRESH_BTN') . '",';
            
$custom[] ="\t".'help_btn : "' JText::_('PLG_RECAPTCHA_HELP_BTN') . '",';
            
$custom[] ="\t".'incorrect_try_again : "' JText::_('PLG_RECAPTCHA_INCORRECT_TRY_AGAIN') . '",';
            
$custom[] ='},';
            
$custom[] ="lang : '" $tag "',";

            return 
implode("\n"$custom);
        }

        
// If nothing helps fall back to english
        
return '';
    }
}
Carpe Diem

adottauncane

  • Visitatore
Re:Registrazione sito: non funziona più
« Risposta #5 il: 12 Nov 2013, 00:25:52 »
Sembra che anche altri utenti abbiano il tuo stesso problema...
Se non si risolve in fretta (non è colpa dell'aggiornamento ma di Re-Captcha) ti conviene disattivarlo e metterne un altro, tipo:
http://extensions.joomla.org/extensions/access-a-security/site-security/captcha/11521
che funziona benissimo.

Offline Mozartino

  • Appassionato
  • ***
  • Post: 367
    • Mostra profilo
Re:Registrazione sito: non funziona più
« Risposta #6 il: 12 Nov 2013, 00:30:07 »
Allora,
se anche non richiedo il captcha leggo i seguenti messaggi:
Il seguente indirizzo del mittente non è valido: vincenzo.sellitto@comprensivomontemurlo.gov.itErrore server SMTP: 5.5.1 Authentication Required. Learn more at 530 5.5.1 http://support.google.com/mail/bin/answer.py?answer=14257 i1sm68741812eeg.0 - gsmtp

Registrazione fallita: Si è verificato un errore durante la spedizione della email di registrazione. E' stato spedito un messaggio all'amministratore di questo sito.

PLUGIN DISATTIVATO: errore come sopra.

Ho cercato qualcosa qui https://groups.google.com/forum/#!forum/recaptcha
ma non sono stato capace di risolvere.

UFFFFFFFF
« Ultima modifica: 12 Nov 2013, 00:38:34 da Mozartino »
Carpe Diem

Offline Mozartino

  • Appassionato
  • ***
  • Post: 367
    • Mostra profilo
Re:Registrazione sito: non funziona più
« Risposta #7 il: 12 Nov 2013, 00:42:34 »
Forse allora sono le impostazioni della posta perchè se provo ad inviare una newsletter con AcyMailing anche qui errore:

Errore durante l'invio del messaggio ANTEPRIMA Newsletter 1 docenti Istituto Comprensivo di Montemurlo a vincenzo.sellitto@comprensivomontemurlo.gov.it | SMTP Connect() failed. SMTP Connect() failed.
 | SMTP -> ERROR: Password not accepted from server: 535-5.7.8 Username and Password not accepted. Learn more at
 535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 a6sm68827466eei.10 - gsmtp
Carpe Diem

Offline Mozartino

  • Appassionato
  • ***
  • Post: 367
    • Mostra profilo
Registrazione sito: non funziona più
« Risposta #8 il: 12 Nov 2013, 00:48:42 »
SONO UN EMERITO C......

Ragazzi scusatemi ma lo merito tutto!
Qualche giorno fa ho cambiato la password dell'account amministratore e non l'avevo modificata nella configurazione globale.

PERDONATEMI.

Comunque adesso se disattivo il captcha tutto funziona correttamente; se lo abilito l'errore è sempre
  • PLG_RECAPTCHA_ERROR_
« Ultima modifica: 12 Nov 2013, 00:59:50 da Mozartino »
Carpe Diem

adottauncane

  • Visitatore
Re:Registrazione sito: non funziona più
« Risposta #9 il: 12 Nov 2013, 02:32:47 »
Ne manca un pezzo:

al posto di

Codice: [Seleziona]
const RECAPTCHA_VERIFY_SERVER = "api-verify.recaptcha.net";


metti

Codice: [Seleziona]
const RECAPTCHA_VERIFY_SERVER = "www.google.com";


riga 26

comunque il fix completo lo trovi qui:

https://github.com/SniperSister/joomla-cms/commit/1317ea7957a74fa1a188e58c3da3ba88e4ac1d89
controlla tutto.

Offline Mozartino

  • Appassionato
  • ***
  • Post: 367
    • Mostra profilo
Re:Registrazione sito: non funziona più
« Risposta #10 il: 12 Nov 2013, 09:50:33 »
GRAZIE!

Con la suddetta precisazione anche il captcha ha ripreso a funzionare correttamente.

GRAZIE!
Carpe Diem

 



Web Design Bolzano Kreatif