]> git.joonet.de Git - adminer.git/commitdiff
Make login to Elasticsearch work again
authorChristian Weiske <cweiske@cweiske.de>
Mon, 10 Mar 2025 07:27:22 +0000 (08:27 +0100)
committerJakub Vrána <jakub@vrana.cz>
Mon, 10 Mar 2025 07:53:19 +0000 (08:53 +0100)
By partially reverting the changes made by
commit 2c9f380c64ec84a1dc44745df29c5fbf1081fcb0
> Elastic: Remove plugin for version 5
which removed the passwordless login plugin from adminer/elastic.php

adminer/elastic.php

index 62e126f1ec2da6f01e67a4dad2165a64dc2962bf..610882a31b335082f5d3894fdaa344b207246139 100644 (file)
@@ -2,8 +2,13 @@
 // To create Adminer just for Elasticsearch, run `../compile.php elastic`.
 
 function adminer_object() {
+       include_once "../plugins/plugin.php";
+       include_once "../plugins/login-password-less.php";
        include_once "../plugins/drivers/elastic.php";
-       return new Adminer\Adminer;
+       return new AdminerPlugin(array(
+                       // TODO: inline the result of password_hash() so that the password is not visible in source codes
+                       new AdminerLoginPasswordLess(password_hash("YOUR_PASSWORD_HERE", PASSWORD_DEFAULT)),
+       ));
 }
 
 include "./index.php";