Skip to content

Fix wrong app ID (public vs secure) for on-demand DataTables action links - #560

Open
jrecosio wants to merge 2 commits into
phax:masterfrom
jrecosio:fix/secure-ajax-edit-links-app-id
Open

jrecosio wants to merge 2 commits into
phax:masterfrom
jrecosio:fix/secure-ajax-edit-links-app-id

Conversation

@jrecosio

Copy link
Copy Markdown
  • Fix wrong app ID (public vs secure) for on-demand DataTables action links
  • fix: secure ajax edit links app id

pi coding agent and others added 2 commits September 18, 2026 08:50
…inks

The secure list pages (Service Groups, Endpoints, Redirects, Business
Cards) build their per-row action links (edit/copy/delete) inside the
DataTables on-demand AJAX callback, using
LayoutExecutionContext.createForAjaxOrAction(aRequestScope).

That AJAX function is registered application-agnostically
(DataTablesOnDemandHelper.registerAjaxFunction(...) has no app ID) and
is therefore not covered by the usual /secure/* application-ID
determination filter. Without it, the application ID is resolved from
the session-wide 'last used application ID', which can be 'public' if
the public part of the SMP was used in the same browser session
before. In that case, the generated links are built against the
public menu tree instead of the secure one, and since the public tree
only has a single menu item ('start'), the edit link resolves to
'/public/.../menuitem-start?action=edit&...' instead of
'/secure/.../menuitem-service_groups?action=edit&...'.

Fix: explicitly pin the AJAX request to the secure application (the
same thing XServletFilterAppIDExplicit would do for a regular
/secure/* request) before resolving the LayoutExecutionContext. Added
as a shared helper createSecureWPECForAjax(...) in
AbstractSMPWebPageForm and used it in all four affected on-demand
callbacks.
@phax

phax commented Sep 18, 2026

Copy link
Copy Markdown
Owner

I am having issues understanding the problem. I tried this locally and everything works as expected... Usually the App-ID should be stored in the PhotonSessionState instance. Maybe you have some issues with the session cookie?

@phax phax self-assigned this Sep 18, 2026
@phax phax added GUI User Interface related Waiting for input labels Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

GUI User Interface related Waiting for input

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants