Repository navigation
Fix: getCookie() überschreibt Core-Funktion, Verzeichnisschutz-Check prüft „redaxo/null“ - #215
Merged
skerbis merged 1 commit intoOct 30, 2026
Conversation
…heck meldet redaxo/null) Die globale Hilfsfunktion getCookie() ersetzte die gleichnamige Funktion aus der standard.js des Cores und lieferte bei fehlendem Cookie null statt ''. Der Verzeichnisschutz-Check ab REDAXO 5.21.5 prüfte dadurch redaxo/null. Umbenannt in quickNavigationGetCookie(). Co-Authored-By: Claude Opus 5.5 <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.
Problem
assets/quick-navigation.jsdefiniert eine globale FunktiongetCookie(). Sie wird nach derstandard.jsdes Cores geladen und ersetzt deren gleichnamige Funktion. Der Unterschied: Die Core-Version liefert bei fehlendem Cookie'', die Addon-Versionnull.Der Verzeichnisschutz-Check ab REDAXO 5.21.5 prüft ein Verzeichnis pro Tag und merkt sich einen Treffer im Cookie
rex_directory_protection_check:Mit
nullgreift!== '', und statt eines echten Verzeichnisses wirdredaxo/nullabgefragt. Das hat zwei Folgen:redaxo/nullmit 404. Der Check meldet nichts, der Cookie wird1, nach 24 Stunden geht es von vorn los.bin/,data/,src/undcache/werden bei aktivem quick_navigation also nie geprüft. Ein tatsächlich ungeschütztes Verzeichnis bliebe unbemerkt.redaxo/nullmit 2xx beantwortet wird, z. B. wenn eine Rewrite-Regel unbekannte Pfade unter/redaxo/ans Frontend weitergibt. Dann zeigt das Backend „The directoryredaxo/nullis insecure“, und weil der Wert im Cookie bleibt, kommt die Meldung jeden Tag wieder.Der alte Check bis 5.21.4 verglich nur mit
== ''und war deshalb nicht betroffen.Änderung
quickNavigationGetCookie()(passend zuquickNavigationFilterInit()undquickNavigationGetUrlVars()). Der einzige Aufruf (Mediensortierung) ist angepasst, Verhalten dort unverändert dank|| "date".package.ymlist nicht angefasst.Nachstellen
rex_directory_protection_checklöschen, Backend neu ladenredaxo/null?redaxo-security-self-testGetestet
REDAXO 5.21.6, quick_navigation 9.1.0, Cookie vor jedem Aufruf gelöscht:
redaxo/null(404)src/core/boot.phpunddata/.redaxo(jeweils 403),getCookie('fehlt')liefert wieder''filename→title→datefunktioniert, keine JS-Fehler