Rhoerr PRs integration#102
Merged
Merged
Conversation
- Add isToolbarAccessAllowed() guard to all 6 unguarded plugins - Cache guard result per-request to avoid repeated config lookups - Block toolbar activation entirely in production mode - Change default enable from 2 (IP-restricted) to 0 (disabled) - Remove stray dump() call in SearchClient plugin - Add dev/debug keywords to composer.json Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Implement CsrfAwareActionInterface on all 5 action controllers - Add HttpPostActionInterface to restrict to POST method - Allowlist cookie names in Cookie controller (C1) - Remove devadmin config key from ConfigUpdate (C3) - Fix exception catches to use \Throwable (H9) - Update toolbar JS to send POST with FORM_KEY Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Restrict phpinfo() to exclude $_ENV and $_SERVER (H2) - Mask sensitive/environment config paths via TypePool + denylist (H3) - Remove session ID from Request tab (H5) - Mask customer email to domain only (M3) - Redact admin backend URL (M4) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Escape all variable output in templates with escapeHtml/escapeHtmlAttr/escapeUrl - Rewrite formatSql() to escape input before applying syntax highlighting - Escape IDE link helper HTML output with htmlspecialchars - Replace innerHTML with textContent in log viewer - Remove executeScriptElements() (re-activates scripts from AJAX HTML) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move all 4 observers from global etc/events.xml to area-specific etc/frontend/events.xml and etc/adminhtml/events.xml. Observers no longer fire on REST API, GraphQL, CLI, or cron requests. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Require isToolbarAccessAllowed() before enabling profiler (H4) - Change ObjectManager::create() to get() in Profiler/Db to avoid constructing ~300 Cookie instances per page load (M10) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Replace ObjectManager usage with constructor DI in Toolbar and Panel - Inject SerializerInterface in Helper/Data, fix and→&& operators - Hash session IDs in temp filenames, add cleanup in shutdown path - Fix cache dedup bug ($cacheEvents → $this->cacheEvents) - Migrate static CSP hashes to SecureRenderer nonces - Guard reflection calls with try/catch \ReflectionException - Remove dead Response plugin - Fix Elasticsearch pullData() return type - Scope window.fetch monkey-patch in dumper.phtml Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Use TypePool::isPresent() with TYPE_SENSITIVE/TYPE_ENVIRONMENT constants (isValueSensitive/isValueEnvironment do not exist on TypePool) - Remove hasShortWhat() ternary that could bypass phpinfo filtering Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix unreachable else branch by adding explicit $file existence check - Fix typo: "reseted" → "reset" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restore @param phpdocs on public plugin methods that were removed during the guard-pattern refactor. Plugin method signatures follow Magento conventions and benefit from explicit documentation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The comment explains WHY the Cache-Control header is set (to control varnish, fastly, and built-in php page caches), which is not obvious from the code alone. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Both validateForCsrf() and createCsrfValidationException() returned null, which is identical to the default behavior for any action that does NOT implement CsrfAwareActionInterface. HttpPostActionInterface alone is sufficient — it restricts routes to POST, and the framework's CsrfValidator applies standard form_key validation to all POST actions by default. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Curly/smart quotes (U+2018, U+2019) were introduced in the catch handler string. Replace with straight ASCII quotes for consistency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The previous commit removed executeScriptElements and its call as a CSP hardening measure. However, four tab templates (log, action, profiler, dumper) contain inline <script> blocks that are loaded via AJAX into innerHTML. Browsers do not execute scripts set via innerHTML, so executeScriptElements (which clones script elements to force execution) is required for those tabs to function. Removing executeScriptElements is a valid goal but requires refactoring all tab templates to use event-delegation or post-load initialization instead of inline scripts — out of scope for this XSS sweep. The stray this.log() debug call has been removed from the restored method. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Without explicit argument override, UrlInterface resolves to Backend\Model\Url in the adminhtml area, breaking frontend URLs generated by Toolbar and Panel blocks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The method indiscriminately deletes temp files older than 20s, which can destroy other sessions' data. It was never called before PR7 added it, and the TODO in cleanOldFiles() itself notes it needs scoping to the current session before use. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
All plugins previously injected Helper\Data just to call isToolbarAccessAllowed(). Since Helper\Data extends AbstractHelper (which pulls in EventManager, Session, etc.), this created circular dependency chains with plugins on bootstrap-path classes like EventManagerInterface, InvokerInterface, CacheInterface, and Zend_Db_Adapter_Abstract. New Service\AccessChecker has minimal dependencies (State, ScopeConfig, RemoteAddress, HttpHeader) that don't trigger any of the intercepted classes. It also includes: - Per-request result caching (single lookup shared by all plugins) - Re-entrancy guard for config reads that trigger cache/DB operations Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Require AccessChecker.isToolbarAccessAllowed() before enabling profiler (H4) - Change ObjectManager::create() to get() in Profiler/Db to avoid constructing ~300 Cookie instances per page load (M10) - Use AccessChecker (introduced in PR1) instead of Helper\Data to avoid circular dependency through Session\Generic Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Panel gained a UrlInterface $frontUrl constructor parameter when ObjectManager::get() was replaced with proper DI injection. Six subclasses that override the constructor were not updated to accept and forward this parameter, causing DI compilation errors: "Incompatible argument type: Required UrlInterface. Actual: array" Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.