fix: resolve RedisCache array offset error and improve discovery diagnostics

- Fix RedisCache driver to handle MGET failures gracefully with fallback
- Add comprehensive discovery context comparison debug tools
- Identify root cause: WEB context discovery missing 166 items vs CLI
- WEB context missing RequestFactory class entirely (52 vs 69 commands)
- Improved exception handling with detailed binding diagnostics
This commit is contained in:
2025-09-12 20:05:18 +02:00
parent 8040d3e7a5
commit e30753ba0e
46990 changed files with 10789682 additions and 89639 deletions

View File

@@ -35,7 +35,7 @@ export class CsrfAutoRefresh {
apiEndpoint: '/api/csrf/refresh',
tokenSelector: 'input[name="_token"]',
formIdSelector: 'input[name="_form_id"]',
enableVisualFeedback: true,
enableVisualFeedback: false, // Disabled to hide browser notifications
enableConsoleLogging: true,
pauseWhenHidden: true, // Pause refresh when tab is not visible
maxRetries: 3,
@@ -110,7 +110,7 @@ export class CsrfAutoRefresh {
// Show visual feedback if enabled
if (this.config.enableVisualFeedback) {
this.showStatusMessage('CSRF protection enabled - tokens will refresh automatically', 'info');
// this.showStatusMessage('CSRF protection enabled - tokens will refresh automatically', 'info');
}
}
@@ -175,7 +175,7 @@ export class CsrfAutoRefresh {
// Show visual feedback
if (this.config.enableVisualFeedback) {
this.showStatusMessage('Security token refreshed', 'success');
// this.showStatusMessage('Security token refreshed', 'success');
}
} catch (error) {
@@ -228,7 +228,7 @@ export class CsrfAutoRefresh {
// Show visual feedback for retry
if (this.config.enableVisualFeedback) {
this.showStatusMessage(`Token refresh failed, retrying... (${this.retryCount}/${this.config.maxRetries})`, 'warning');
// this.showStatusMessage(`Token refresh failed, retrying... (${this.retryCount}/${this.config.maxRetries})`, 'warning');
}
} else {
// Max retries reached
@@ -236,7 +236,7 @@ export class CsrfAutoRefresh {
this.stop();
if (this.config.enableVisualFeedback) {
this.showStatusMessage('Token refresh failed. Please refresh the page if you encounter errors.', 'error');
// this.showStatusMessage('Token refresh failed. Please refresh the page if you encounter errors.', 'error');
}
}
}

View File

@@ -1,67 +0,0 @@
import {useEvent} from "../../core";
import {removeModules} from "../../core/removeModules";
let keydownHandler = null;
let clickHandler = null;
export function init() {
const el = document.getElementById("sidebar-menu");
const button = document.getElementById('menu-toggle');
const aside = document.getElementById('sidebar');
const backdrop = document.querySelector('.backdrop');
const footer = document.querySelector('footer');
const headerLink = document.querySelector('header a');
// Check if required elements exist
if (!button || !aside || !backdrop) {
console.info('[Sidebar] Required elements not found, skipping sidebar initialization');
return;
}
useEvent(button, 'click', (e) => {
aside.classList.toggle('show');
//aside.toggleAttribute('inert')
let isVisible = aside.classList.contains('show');
if (isVisible) {
backdrop.classList.add('visible');
if (footer) footer.setAttribute('inert', 'true');
if (headerLink) headerLink.setAttribute('inert', 'true');
} else {
backdrop.classList.remove('visible');
if (footer) footer.removeAttribute('inert');
if (headerLink) headerLink.removeAttribute('inert');
}
})
keydownHandler = (e) => {
if(e.key === 'Escape'){
if(aside.classList.contains('show')){
aside.classList.remove('show');
backdrop.classList.remove('visible');
}
}
}
useEvent(document, 'keydown', keydownHandler)
clickHandler = (e) => {
aside.classList.remove('show');
backdrop.classList.remove('visible');
if (footer) footer.removeAttribute('inert');
if (headerLink) headerLink.removeAttribute('inert');
}
useEvent(backdrop, 'click' , clickHandler)
}
export function destroy() {
/*document.removeEventListener('keydown', keydownHandler);
document.removeEventListener('click', clickHandler);*/
removeModules('sidebar');
}