Menu

login() method hasn't worked since 4.7.2 or 4.7.3

Help
adrianbj
2020-12-07
2021-02-07
  • adrianbj

    adrianbj - 2020-12-07

    Starting a new topic about this, because it seems that https://sourceforge.net/p/adminer/discussion/960418/thread/0ebcd89548/ is perhaps discussing two different things.

    But the point to this new topic is that I used to be able to:

    $_GET['username'] = '';
    
    function credentials() {
            return array($this->server, $this->name, $this->pass);
    }
    
    function login() {
            return true;
    }
    

    but now I am stuck with hacking with JS to submit the login form, eg:

    addEventListener('DOMContentLoaded', function () {
              document.forms[0].submit();
    });
    

    Is there any way we can get back the ability to automatically login without that form submit hack please?

     
  • Jakub Vrána

    Jakub Vrána - 2021-02-07

    You can set a session variable or a cookie with the encrypted password. I'm not going to describe it here but look at what's Adminer doing (search for encrypt_string) and try to mimic it before including Adminer.

     

Log in to post a comment.