Skip to content
Snippets Groups Projects
Commit 2d937cd0 authored by Mario Wenzel's avatar Mario Wenzel
Browse files

nolock plugin

parent 54c779a3
No related branches found
No related tags found
No related merge requests found
......@@ -17,6 +17,11 @@ services:
adminer:
image: adminer:4.7.6
build:
context: ./src
dockerfile: Dockerfile
environment:
- ADMINER_PLUGINS=account-nolock-plugin
restart: always
ports:
- 8085:8080
from adminer:4.7.3
USER root:root
COPY account-nolock-plugin.php /var/www/html/plugins/
USER adminer:adminer
<?php
/** Disable account locking
*/
class AdminerNolock {
function bruteForceKey() {
// Return high resolution time
// to get for each call a different key.
// This effectively disables the locking mechanism
// that forces a wait time of 30 min after 30 failed
// login attempts. This could is needed in class room situations
// with all clients accessing adminer through the same IP
// to prevent locking adminer by single students.
// convert time to string by prefixing "t"
// as the caller expects a string.
return "t" . hrtime(true);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment