Skip to content
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

Ignore specific url parameters when following location headers #3856

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

noamblitz
Copy link
Contributor

Changes

Before, when a sessionid was present in the URL parameters, the location header would also have this sessionid, and the database would blow up with URLs. This code strips certain params from the URL based on the Answer of a Question OOI. Also, some general fixes for questions are present.

Issue link

Closes #3207
Closes #3849
Closes #3848

Demo

The answer of this question:

image

Makes this config:

image

And when this Location header is present:

image

The sessionid will be stripped so that only this URL is created:

image

QA notes

Answer the question about oois-in-headers. Find Location headers that have one of the params from the question in them. See that the URLs that are created do not have those params.


Code Checklist

  • All the commits in this PR are properly PGP-signed and verified.
  • This PR only contains functionality relevant to the issue.
  • I have written unit tests for the changes or fixes I made.
  • I have checked the documentation and made changes where necessary.
  • I have performed a self-review of my code and refactored it to the best of my abilities.
  • Tickets have been created for newly discovered issues.
  • For any non-trivial functionality, I have added integration and/or end-to-end tests.
  • I have informed others of any required .env changes files if required and changed the .env-dist accordingly.
  • I have included comments in the code to elaborate on what is not self-evident from the code itself, including references to issues and discussions online, or implicit behavior of an interface.

Checklist for code reviewers:

Copy-paste the checklist from the docs/source/templates folder into your comment.


Checklist for QA:

Copy-paste the checklist from the docs/source/templates folder into your comment.

@noamblitz noamblitz requested a review from a team as a code owner November 19, 2024 14:50
@noamblitz noamblitz changed the title ignore specific url parameters when following location headers Ignore specific url parameters when following location headers Nov 19, 2024
Copy link

sonarcloud bot commented Nov 19, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
56.8% Coverage on New Code (required ≥ 80%)
20.7% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant