Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Marco

Pages: [1]
1
How to / Re: Stop downgrading phpMyAdmin
« on: September 03, 2020, 10:27:14 AM »
cwp is using a version that is compatible with autologin, if you use any other autologin from admin/user panel will not work.

I know and i'm not interested on it as long as i'm using GAuth to login.
I was looking to a solution on how to stop downgrading phpMyAdmin, but probably there is no one.

I've just solved by myself, creating a subdomain, installing phpMyAdmin manually, then hosting phpMyAdmin directly on a reserved domain.

I hope that CWP Team will start working on a newest version as soon as possibile, due to known security vulnerability on that version, that i'll suggest anyone to block totally and install manually somewhere else. I wish to have one more click, logging-in to one of the most used tools, instead of a version that could be a security problem.

2
How to / Re: Stop downgrading phpMyAdmin
« on: September 02, 2020, 03:50:38 PM »
create your own file with different name

I did, but CWP is still forcing the old version. Maybe there is an hidden cronotask that will restore the old phpMyAdmin version or it will be executed every CWP Update.

My first question is, how to stop executing this downgrade? So, how can i stop the execution of the original /scripts/mysql_phpmyadmin_update?

3
How to / Stop downgrading phpMyAdmin
« on: August 31, 2020, 08:52:23 AM »
Hello there,

I've an issue on my VPS. The CWP is actually forcing an old version of phpMyAdmin as long as I'm daily updating the version.
I tried with a partial solution, by editing the scripts/mysql_phpmyadmin_update

From:
Code: [Select]
#!/bin/bash

current_version=`cat /usr/local/cwpsrv/var/services/pma/README | grep Version | cut -d " " -f 2`
cwp_latest=`curl -Ss "http://static.cdn-cwp.com/files/mysql/pma.txt"`

if [ "$current_version" != "$cwp_latest" ];then
echo "Updating phpMyAdmin from ${current_version} to version ${cwp_latest}"
Date=`date "+%d-%m-%Y"`

if [ -e "/usr/local/cwpsrv/var/services/pma" ];then
mv /usr/local/cwpsrv/var/services/pma /usr/local/cwpsrv/var/services/pma_$Date.bak
fi

cd /usr/local/cwpsrv/var/services/
wget http://static.cdn-cwp.com/files/mysql/phpMyAdmin-${cwp_latest}-all-languages.zip
unzip -o -q phpMyAdmin-${cwp_latest}-all-languages.zip
rm -f phpMyAdmin-${cwp_latest}-all-languages.zip
mv phpMyAdmin-${cwp_latest}-all-languages pma
chown -R cwpsvc:cwpsvc pma
rm -rf /usr/local/cwpsrv/var/services/pma/setup
mv /usr/local/cwpsrv/var/services/pma/config.sample.inc.php /usr/local/cwpsrv/var/services/pma/config.inc.php
ran_password=$(</dev/urandom tr -dc A-Za-z0-9 | head -c32)
sed -i "s|\['blowfish_secret'\] = ''|\['blowfish_secret'\] = '${ran_password}'|" /usr/local/cwpsrv/var/services/pma/config.inc.php
new_version=`cat /usr/local/cwpsrv/var/services/pma/README | grep Version | cut -d " " -f 2`
echo "phpMyAdmin Update, new version ${new_version}"
else
echo "You have the latest PMA version recommended by CWP!"
fi


To:
Code: [Select]
#!/bin/bash

    current_version=`cat /usr/local/cwpsrv/var/services/pma/README | grep Version | cut -d " " -f 2`
    cwp_latest=`curl -Ss "https://www.phpmyadmin.net/home_page/version.txt"`
    readarray -t official_latest <<<"$cwp_latest"
    real_version=${official_latest[0]}
    real_url=${official_latest[2]}
    if [ "$current_version" != "$real_version" ];then
    echo "Updating phpMyAdmin from ${current_version} to version ${real_version}"
    Date=`date "+%d-%m-%Y"`

    if [ -e "/usr/local/cwpsrv/var/services/pma" ];then
    mv /usr/local/cwpsrv/var/services/pma /usr/local/cwpsrv/var/services/pma_$Date.bak
    fi

    cd /usr/local/cwpsrv/var/services/
    wget ${real_url}
    unzip -o -q phpMyAdmin-${real_version}-all-languages.zip
    rm -f phpMyAdmin-${real_version}-all-languages.zip
    mv phpMyAdmin-${real_version}-all-languages pma
    chown -R cwpsvc:cwpsvc pma
    rm -rf /usr/local/cwpsrv/var/services/pma/setup
    mv /usr/local/cwpsrv/var/services/pma/config.sample.inc.php /usr/local/cwpsrv/var/services/pma/config.inc.php
    ran_password=$(</dev/urandom tr -dc A-Za-z0-9 | head -c32)
    sed -i "s|\['blowfish_secret'\] = ''|\['blowfish_secret'\] = '${ran_password}'|" /usr/local/cwpsrv/var/services/pma/config.inc.php
    new_version=`cat /usr/local/cwpsrv/var/services/pma/README | grep Version | cut -d " " -f 2`
    echo "phpMyAdmin Update, new version ${new_version}"
    else
    echo "You have the latest PMA version recommended by phpMyAdmin for CWP!"
    fi

This last one will automatically update the latest stable phpMyAdmin version but, during the night, this script will be restored to the old one, downgrading my phpMyAdmin version.

Can i fix this? How to?

Thanks and best regards.

Pages: [1]