enhancement
major
minor
major
minor
major
#29680
Classic UI: the anonymous session is offered the developer options and can run "Ressourcen neu laden"
Problem
An anonymous visitor of /<app>/servlet/LayoutServlet (the classic UI of an application whose start page is the React UI) gets a sidebar with "Dokumentation", "Entwickleroptionen" and "Anmelden", and a login dialog over it. The developer options offer "Ressourcen neu laden", "Theme neu laden", "Ressourcen-Keys anzeigen" and "Alle Kommandos zeigen", and they execute. "Ressourcen neu laden" ran for the anonymous session (a 1.5 s request in the log). "Alle Kommandos zeigen" lists Skript Rekorder, Designmodus, Layout freigeben, Layout exportieren and Modellbasierte Suche, which are disabled ("Nicht anzeigbar").
Seen in the TL Development app, started with the development configuration (deploy/local), snapshot build 42. Not checked with the production configuration.
Expected
Developer commands that change server state (reloading resources or the theme), or that reveal internals, are available to authenticated administrators only, never to the anonymous session, whatever the deployment mode. The anonymous classic UI shows the login and nothing else.
Ursache
Der anonyme Besucher ist mit dem Konto anonymous angemeldet und erhält das normale Hauptlayout. Die Kommandos reloadI18N, reloadTheme, toggleAlwaysShowKeys und toggleShowAllCommands waren nur durch DebugOnly geschützt (prüft allein den Debug-Modus tl_enable_debug, nicht den Benutzer); ihr Ziel mainTabber hat kein Sicherheitsobjekt, so dass auch die Rechteprüfung sie durchlässt. Das Popup "Entwickleroptionen" (toolrow/scriptingButtons.xml) wird ohne Bedingung in die Sidebar/Toolrow eingebunden.
Lösung
- Die Entwickler-Kommandos reloadI18N, reloadTheme, toggleAlwaysShowKeys, toggleShowAllCommands, openScriptRecorder und exportLayout erhalten zusätzlich die Ausführbarkeitsregel RootOnly (nur Administratoren). Damit ist die Ausführung auch dann verweigert, wenn das Kommando direkt angefordert wird.
- Das Popup "Entwickleroptionen" samt GUI-Inspektor-Eintrag (toolrow/scriptingButtons.xml) wird für die anonyme Sitzung nicht angezeigt (ConditionalViewConfiguration mit IsAnonymousUser, wie beim Benutzermenü toolrow/homeButton.xml).
- Die Dokumentation bleibt für anonyme Besucher erreichbar.