cloudpanel-io/cloudpanel-ce

phpMyAdmin sorting not working

Closed this issue · 4 comments

CloudPanel version(s) affected

2.4.0

Description

It's not a bug. In the earlier days of phpMyAdmin you just clicked on a column to sort it.

In the latest versions, press "shift" and click on the column to sort.

However, phpMyAdmin will be updated to 5.2.1 with the next CloudPanel version at the end of this month.

Yes, this is a bug. I installed fresh, new phpMyAdmin 5.2.1 on another server and sorting with click works just fine. The shift+click scenario is used for sorting by multiple columns. You can even try this on phpMyAdmin demo (https://demo.phpmyadmin.net/master-config/).

The issue is still present in new Cloudpanel, this is very annoying and makes work with phpMyAdmin very unplesant. I suspect that the issue is with phpMyAdmin's HMAC signatures of queries when clicking the link - perhaps some problems with nginx config for phpMyAdmin?

Thanks

Originally posted by @ondrejvrabel in #266 (comment)

How to reproduce

Open phpMyAdmin from CloudPanel, open table and try to sort column by clicking.

Possible Solution

No response

Additional Context

No response

Hello,

I can confirm that the truth lies somwhere in the middle.
It is indeed correct that the phpmyadmin demo works without pressing the shift button and using shift can stack columns.

I can also confirm that the Cloudpanel version only works with shift.

Ctrl+click works as expected in both cases.

Having said all that though, the version used on the phpMyAdmin site is NOT 5.2.1. It is 6.0.0-dev.

I've tested it on 5.2.1 on a cpanel installation. Unfortunately it seems that on a cpanel, phpMyAdmin can sort witht holding down shift.

I suppose it's either a misconfiguration on cloudpanel or something else. I'd be more inclined to assume it's a misconfiguration.

Hello @ondrejvrabel, Hello @escozul,

I can confirm that it's a bug. I finally figured out what the problem was.

@ondrejvrabel was right, it was related to the HMAC signatures.

I have contacted you in Discord. I would be happy if you could test and confirm the fix.

Best,
Stefan Wieczorek

Thanks, @escozul, for testing the patch with me on Discord.

The bug will be fixed with the next version, 2.4.1, at the end of January.

If you don't want to wait, you can do the following:

Login to your server via SSH as root user and execute the following command:

curl -s https://gist.githubusercontent.com/swieczorek/11a8b8024e0cd8b467e7681b323a5f3c/raw/e2261fc88099de353fb572fa7d6d661048f26fa1/gistfile1.txt > /home/clp/htdocs/app/files/public/phpmyadmin/login.php

Fixed in v2.4.1.