Menu

#473 Leading slash in form path breaks when deployed in subfolder

5.1
open
nobody
None
8
2020-09-22
2020-09-22
No

When I click on a table under "Schema" -> "Public" -> "Tables" and then on "Submit Query" in the right frame, the form request breaks with a "Not Found" error.

The request goes to:

https://hitontology.eu/redirect.php?subject=table&server=postgres%3A5432%3Aallow&database=hito&schema=public&table=client

However it should go to:

https://hitontology.eu/phppgadmin/redirect.php?subject=table&server=postgres%3A5432%3Aallow&database=hito&schema=public&table=client

Because it is deployed under https://hitontology.eu/phppgadmin/.

The reason seems to be a leading slash in the path:

<form method="POST" action="/redirect.php?subject=table&amp;server=postgres%3A5432%3Aallow&amp;database=hito&amp;schema=public&amp;table=client"><textarea width="90%" name="query" rows="5" cols="100" resizable="true">SELECT * FROM public.client;</textarea><br><input type="submit"></form>

So I assume that is a very simple fix, just replace "/redirect" with "redirect" so the path is relative.

We use phpPgAdmin 7.x-dev (PHP 5.6.40), however I didn't find that milestone so I put it in 5.1, which is the highest at the time, I hope that is correct.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB