Current time: 12-26-2024, 06:38 PM Hello There, Guest! (LoginRegister)


Post Reply 
nach update: login - "Query was empty"
Author Message
sisko Offline
Junior Member
*

Posts: 108
Joined: Aug 2007
Reputation: 0
Post: #12
RE: nach update: login - "Query was empty"
ordner ist angelegt. kann allerdinsg vor morgen frueh nicht testen obs was brachte.
in der engine/ispcp-mbox-mngr find ich 2 mal
Code:
$mail_pass=decrypt_db_password($mail_pass);

sollte also dort passen.

in der ispcp_common_methods.pl sind mehrere eintraege vorhanden. allerdings finde ich dort nichts eindeutiges zu 'mail'. weis also nicht ob da was nicht passt.

Code:
sub decrypt_db_password {

    my ($pass) = @_;

    push_el(\@main::el, 'decrypt_db_password()', 'Starting...');

    if (!defined($pass) || $pass eq '') {

        push_el(\@main::el, 'decrypt_db_password()', 'ERROR: Undefined input data ($pass)...');

        return (1, '');

    }

    if (length($main::db_pass_key) != 32 || length($main::db_pass_iv) != 8) {

        push_el(\@main::el, 'decrypt_db_password()', 'WARNING: KEY or IV has invalid length');

        return (1, '');
    }

    my $cipher = Crypt::CBC -> new(
                                    {
                                        'key'             => $main::db_pass_key,
                                        'keysize'         => 32,
                                        'cipher'          => 'Blowfish',
                                        'iv'              => $main::db_pass_iv,
                                        'regenerate_key'  => 0,
                                        'padding'         => 'space',
                                        'prepend_iv'      => 0
                                    }
                                  );

    my $decoded = decode_base64("$pass\n");

    my $plaintext = $cipher -> decrypt($decoded);


    push_el(\@main::el, 'decrypt_db_password()', 'Ending...');

    return (0, $plaintext);

}

sub setup_main_vars {

    push_el(\@main::el, 'setup_main_vars()', 'Starting...');

    #
    # Database backend vars;
    #

    $main::db_host = $main::cfg{'DATABASE_HOST'};

    $main::db_user = $main::cfg{'DATABASE_USER'};

    $main::db_pwd = $main::cfg{'DATABASE_PASSWORD'};

    $main::db_name = $main::cfg{'DATABASE_NAME'};

    if ($main::db_pwd ne '') {

        my $rs = undef;

        ($rs, $main::db_pwd) = decrypt_db_password($main::db_pwd);

        # Silently quit
        return 0 if ($rs != 0);

    }

werde das kuenftig auch manuel machen. gute anleitungen dazu gibts ja. Smile
07-05-2009 09:02 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: nach update: login - "Query was empty" - sisko - 07-05-2009 09:02 AM

Forum Jump:


User(s) browsing this thread: 6 Guest(s)