phpmyadmin直接url访问(发布方法)

时间:2019-11-27 00:50:19

标签: phpmyadmin

我正在尝试使用url post方法访问phpmyadmin。

www.example.com/phpmyadmin/?pma_username = ####&pma_password = ####

但是什么也没发生,phpmyadmin是否以某种方式阻止了通过URL的直接访问?还是我使用了错误的post变量?

这是一块不变的phpmyadmin index.php登录表单。

    <!-- Login form -->
<form method="post" id="login_form" action="index.php" name="login_form" class="disableAjax login hide js-show">
    <fieldset>
    <legend><input type="hidden" name="set_session" value="123" />Log in<a href="./doc/html/index.html" target="documentation"><img src="themes/dot.gif" title="Documentation" alt="Documentation" class="icon ic_b_help" /></a></legend><div class="item">
            <label for="input_username">Username:</label>
            <input type="text" name="pma_username" id="input_username" value="" size="24" class="textfield"/>
        </div>
        <div class="item">
            <label for="input_password">Password:</label>
            <input type="password" name="pma_password" id="input_password" value="" size="24" class="textfield" />
        </div>    <input type="hidden" name="server" value="1" /></fieldset><fieldset class="tblFooters"><input value="Go" type="submit" id="input_go" /><input type="hidden" name="target" value="index.php" /><input type="hidden" name="token" value="123" /></fieldset>

1 个答案:

答案 0 :(得分:0)

www.example.com/phpmyadmin/?pma_username=####&pma_password=####中一样,将参数指定为URL的一部分实际上是GET查询,而不是POST(POST使用网页上的表单值而不是URL查询字符串)。

您尝试使用的格式有些陈旧,并且由于security concerns而在phpMyAdmin 4.9.0中删除了。您可以still specify服务器,数据库,表和目标页面;但是,用户名和密码选项已删除。

对于类似的功能,您也许可以提出一个涉及auth_type config的解决方案(该解决方案将用户名和密码硬编码到配置指令中,因此需要您配置一些其他身份验证方式,例如通过Web进行HTTP BASIC服务器)或auth_type登录(需要实现自己的身份验证脚本,示例在文档中)。基于将实际POST值传递回登录页面,您也许可以提出一个重定向表单,但是由于安全措施到位,我不确定是否可行。

基本上,抱歉,此功能已消失,不太可能再次出现。