Skip to content
Snippets Groups Projects
Commit eb9183ed authored by ale's avatar ale
Browse files

Add plugin to debug login cookie issues

parent e30ce3bc
No related branches found
No related tags found
No related merge requests found
Pipeline #49245 passed
<?php
/*
* Plugin Name: A/I - Debug login issues
* Plugin URI:
* Description: Debug login issues
* Version: 0.0.1
* Author: Autistici/Inventati
* Author URI: https://autistici.org
**/
function debug_login_auth_cookie_malformed($cookie, $scheme) {
error_log("LOGIN: auth_cookie_malformed: scheme={$scheme} cookie={$cookie}");
}
add_action('auth_cookie_malformed', 'debug_login_auth_cookie_malformed', 10, 2);
function debug_login_auth_cookie_expired($cookie_elements) {
$username = $cookie_elements['username'];
error_log("LOGIN: auth_cookie_expired: username={$username}");
}
add_action('auth_cookie_expired', 'debug_login_auth_cookie_expired');
function debug_login_auth_cookie_bad_username($cookie_elements) {
$username = $cookie_elements['username'];
error_log("LOGIN: auth_cookie_bad_username: username={$username}");
}
add_action('auth_cookie_bad_username', 'debug_login_auth_cookie_bad_username');
function debug_login_auth_cookie_bad_hash($cookie_elements) {
$username = $cookie_elements['username'];
$token = $cookie_elements['token'];
error_log("LOGIN: auth_cookie_bad_hash: username={$username} token={$token}");
}
add_action('auth_cookie_bad_hash', 'debug_login_auth_cookie_bad_hash');
function debug_login_auth_cookie_bad_session_token($cookie_elements) {
$username = $cookie_elements['username'];
$token = $cookie_elements['token'];
error_log("LOGIN: auth_cookie_bad_session_token: username={$username} token={$token}");
}
add_action('auth_cookie_bad_session_token', 'debug_login_auth_cookie_bad_session_token');
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