Menu

#560 href URL in data grid column title used for sort is absolute to the root

4.3.1
closed-works-for-me
nobody
None
5
2018-01-23
2017-07-07
No

Hello,

I've setup adminer behind a nginx reverse-proxy with vhost/location on a URL path /adminer. That means to work properly all hrefs must be relative to the root, not absolute. It works in most cases but I've found a href that is starting with "/" making it's absolute following to the / instead of /adminer/. It's href on the column in grid view when I'm trying to sort the dataset clicking on the column header.

The reason I'm submitting a bug regarding this is that in other places like table list hrefs are relative and workin fine.

Attaching table selection and column order href screenshots for reference.

Source code is probably on 318 line in adminer/select.inc.php (github version, commit e1f43da):

315 $href = remove_from_uri('(order|desc)[^=]*|page') . '&order%5B0%5D=' . urlencode($key);
316 $desc = "&desc%5B0%5D=1";
317 echo '';

318 echo ''; // $order[0] == $key - COUNT(*)
319 echo apply_sql_function($val["fun"], $name) . "
"; //! columns looking like functions
320 echo "";

Thanks.

P.S. I'm using Adminer to work with PostgreSQL 9.6.3 database + dockerized Adminer 4.3.1.

2 Attachments

Discussion

  • Dmitry Glavchev

    Dmitry Glavchev - 2017-07-08

    Same thing is happening with href of permanent connection to the left of login screen

     
  • Jakub Vrána

    Jakub Vrána - 2018-01-23
    • status: open --> closed-works-for-me
     
  • Jakub Vrána

    Jakub Vrána - 2018-01-23

    Adminer uses REQUEST_URI. Set it up correctly in your nginx config.

     

Log in to post a comment.