Skip to content

Always remove filter maybe_double_knock http_response filter! #1986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2025

Conversation

pfefferle
Copy link
Member

@pfefferle pfefferle commented Jul 23, 2025

This PR ensures that the http_response filter will always be removed, sepecially for non AP requests.

props @akirk !

Proposed changes:

Other information:

  • Have you written new tests for your changes, if applicable?

Testing instructions:

  • Go to '..'

Changelog entry

  • Automatically create a changelog entry from the details below.
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Added - for new features
  • Changed - for changes in existing functionality
  • Deprecated - for soon-to-be removed features
  • Removed - for now removed features
  • Fixed - for any bug fixes
  • Security - in case of vulnerabilities

Message

@pfefferle pfefferle requested review from akirk and obenland July 23, 2025 08:15
@pfefferle pfefferle self-assigned this Jul 23, 2025
@Copilot Copilot AI review requested due to automatic review settings July 23, 2025 08:15
@pfefferle pfefferle added the Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary. label Jul 23, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a potential infinite recursion issue by moving the filter removal to occur before the early return conditions in the maybe_double_knock method. The change ensures that the http_response filter is always removed at the beginning of the method execution, preventing infinite loops even when the method returns early.

  • Relocated the remove_filter call to prevent infinite recursion in all code paths
  • Added explanatory comment for the filter removal

@pfefferle pfefferle merged commit 4d14174 into trunk Jul 23, 2025
15 checks passed
@pfefferle pfefferle deleted the fix/signature-hook branch July 23, 2025 08:21
pfefferle added a commit that referenced this pull request Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog Disables the "Changelog Updated" action for PRs where changelog entries are not necessary.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants