Skip to content

Remove paramset in url_sig#11590

Closed
ezelkow1 wants to merge 1 commit intoapache:masterfrom
ezelkow1:urlsig-api
Closed

Remove paramset in url_sig#11590
ezelkow1 wants to merge 1 commit intoapache:masterfrom
ezelkow1:urlsig-api

Conversation

@ezelkow1
Copy link
Copy Markdown
Member

This removes the ParamsSet call within url_sig which was just clearing out the ATS parsed params anyway

Copy link
Copy Markdown
Contributor

@JosiahWI JosiahWI left a comment

Choose a reason for hiding this comment

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

Looks good.

if (*new_path) {
TSUrlPathSet(rri->requestBufp, rri->requestUrl, new_path, strlen(new_path));
}
TSUrlHttpParamsSet(rri->requestBufp, rri->requestUrl, nullptr, 0);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can we really remove this line? The original behavior may mean to remove "matrix parameters", which is everything that follows a semicolon in a URL.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Im trying to create an autest for this first before merging. I believe what it was doing was packing it all into 'new_path', setting the Url path, and then removing the matrix params afterwards.

So with the old implementation would doing a ParamsSet end up re-evaluating the path to locate the params again before removing them? I was figuring that what it was doing was setting the Path with any included new path params and then remove ATS' stored path params so that it would not end up being duplicated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I didn't follow the entire logic. It just doesn't look like equivalent even if we set nullptr. If new_path contains parameters it may be fine, but what if we don't set new_path here?

Copy link
Copy Markdown
Member Author

@ezelkow1 ezelkow1 Jul 22, 2024

Choose a reason for hiding this comment

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

alright let me think about it some more. Pinged some around here but no one really knows how this code was meant to work any more so its a bit of reverse engineering going on. I believe that if we dont set new_path so it doesnt clean up the path params, that it possibly would have been rejected anyway because the plugin is going to parse the path params as things that are expected to be signed (or elements of signing that it needs to interpret) and so it would error out on them

@ezelkow1 ezelkow1 closed this Jul 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants