Refactor URL query data handling between form and confirmation page to use TempStore or session storage

Created on 16 May 2025, about 1 month ago

Problem/Motivation

The module currently passes important and potentially sensitive data between the main form and the confirmation page via URL query parameters. This includes encoded taxonomy term names, term IDs, total nodes, unpublished flags, and vocabulary IDs:

While functional, this approach has some drawbacks:

  • Exposes potentially sensitive or internal information in the URL.
  • Adds complexity due to encoding/decoding requirements.
  • Increases the risk of user or system error via URL tampering.
  • URLs can become too long, especially with large node ID arrays.

Proposed resolution

Use Drupal's private tempstore (private_tempstore) or $_SESSION to securely store this data across requests. This will:

  • Improve security and reduce the risk of data exposure.
  • Simplify confirmation page controller logic (no decoding).
  • Keep URLs clean and safe.
  • Align with Drupal best practices for multi-step workflows or batch operations.

Data model changes

This change will improve the security and maintainability of the module and align with standard Drupal practices. It will also pave the way for further enhancements (e.g., allowing users to resume pending operations or navigate back/forth more cleanly).

📌 Task
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India ighosh

Live updates comments and jobs are added and updated live.
  • Security

    It is used for security vulnerabilities which do not need a security advisory. For example, security issues in projects which do not have security advisory coverage, or forward-porting a change already disclosed in a security advisory. See Drupal’s security advisory policy for details. Be careful publicly disclosing security vulnerabilities! Use the “Report a security vulnerability” link in the project page’s sidebar. See how to report a security issue for details.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024