Skip to content
Snippets Groups Projects

Issue #3399951: ajax_page_state leaks through request in Views Ajax

Open Issue #3399951: ajax_page_state leaks through request in Views Ajax
2 unresolved threads
Open James Gilliland requested to merge issue/drupal-3399951:3399951-ajaxpagestate into 11.x
2 unresolved threads

Closes #3399951

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Lauri Timmanee
  • catch added 1 commit

    added 1 commit

    • 64f55fa6 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • catch resolved all threads

    resolved all threads

  • catch added 1 commit

    added 1 commit

    • 94cf2eb1 - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • Lauri Timmanee resolved all threads

    resolved all threads

  • Lauri Timmanee added 1 commit

    added 1 commit

    • 523f4bcb - Apply 1 suggestion(s) to 1 file(s)

    Compare with previous version

  • godotislate added 98 commits

    added 98 commits

    • 523f4bcb...502c857b - 90 commits from branch project:11.x
    • b477875f - Issue #3399951: ajax_page_state leaks through request in Views Ajax
    • 7808f902 - Consolidate ajax state parameter string into a constant
    • 96e9537c - Remove extra ajax_page_state workarounds
    • b65db7d1 - Consolidate ajax parameter filtering list
    • a26ed619 - Apply 1 suggestion(s) to 1 file(s)
    • a239c9fb - Apply 1 suggestion(s) to 1 file(s)
    • 07d4ac5c - Apply 1 suggestion(s) to 1 file(s)
    • 5f24081f - Fix ajax_page_state for theme negotiation.

    Compare with previous version

  • godotislate added 1 commit

    added 1 commit

    • d9c878ff - Fix ajax_page_state for theme negotiation.

    Compare with previous version

  • 37 37 */
    38 38 const AJAX_REQUEST_PARAMETER = '_drupal_ajax';
    39 39
    40 /**
    41 * Request parameter used to track page state.
    42 *
    43 * This is used to track various page states across ajax requests like the
    44 * current theme and available libraries.
    45 */
    46 const AJAX_PAGE_STATE_REQUEST_PARAMETER = 'ajax_page_state';
    • Maintainer

      Event subscribers aren't API, so we shouldn't be using this constant elsewhere in the code base.

      I think all the usages elsewhere could just go back to using the string as they currently do, feels out of scope for the bugfix. If we want to add a constant, we should add it on an interface or API class somewhere else in a follow-up.

    • godotislate changed this line in version 10 of the diff

      changed this line in version 10 of the diff

    • Please register or sign in to reply
  • godotislate added 79 commits

    added 79 commits

    • d9c878ff...f2daf512 - 70 commits from branch project:11.x
    • d7552391 - Issue #3399951: ajax_page_state leaks through request in Views Ajax
    • a14dc6c4 - Consolidate ajax state parameter string into a constant
    • e0033bfc - Remove extra ajax_page_state workarounds
    • b433e5e7 - Consolidate ajax parameter filtering list
    • 0b4338be - Apply 1 suggestion(s) to 1 file(s)
    • 64b986b1 - Apply 1 suggestion(s) to 1 file(s)
    • ad6456ef - Apply 1 suggestion(s) to 1 file(s)
    • 0695d179 - Fix ajax_page_state for theme negotiation.
    • 734905ac - Do not use subscriber constants outside its class because it is not API.

    Compare with previous version

  • 124 125 }
    125 126
    127 /**
    128 * Tests if exposed filtering via AJAX theme negotiation works.
    129 */
    130 public function testExposedFilteringThemeNegotiation(): void {
    131 // Install 'claro' and configure it as administrative theme.
    132 $this->container->get('theme_installer')->install(['claro']);
    133 $this->config('system.theme')->set('admin', 'claro')->save();
    134
    135 // Visit the View page.
    136 $this->drupalGet('admin/content');
    137
    138 // Search for "Page One".
    139 $this->submitForm(['title' => 'Page One'], 'Filter');
    140 $this->assertSession()->assertWaitOnAjaxRequest();
  • godotislate added 1 commit

    added 1 commit

    • b8b2f102 - Update file ExposedFilterAJAXTest.php

    Compare with previous version

  • godotislate added 1 commit

    added 1 commit

    • 0e96e479 - Update ExposedFilterAJAXTest.php

    Compare with previous version

  • Please register or sign in to reply
    Loading