Skip to content

Improved: previous request information lost at login#1479

Open
nmalin wants to merge 3 commits into
apache:trunkfrom
nmalin:improve-previous-request
Open

Improved: previous request information lost at login#1479
nmalin wants to merge 3 commits into
apache:trunkfrom
nmalin:improve-previous-request

Conversation

@nmalin

@nmalin nmalin commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Currently, when you arrive on OFBiz after the login page, you're redirected to the default request even though you have specified a URI.

Try to log on to https://localhost:8443/webtools/control/entity/find/Party, you are redirected to the login page, and after login, OFBiz returns to the page https://localhost:8443/webtools/control/main instead of the asked URI: entity/find/Party

This comes from issue OFBIZ-12047 (d60bf15, 33fe2aa) where we remove the previous request on the 'login' URI to be sure to clean it.

We reversed the logic, and set the previous request only when checkLogin controls a request that needs authentication and isn't an AJAX call or login (or related) URL.

Currently, when you arrived on OFBiz after the login page you're redirected to default request even though you have specified a URI.

Try to log on https://localhost:8443/webtools/control/entity/find/Party, you are redirect to login page and after login OFBiz return on page https://localhost:8443/webtools/control/main

This come from issue OFBIZ-12047 (d60bf15, 33fe2aa) where we remove the previous request on 'login' uri to be sure to clean it.

We reversed the logic, set previous request only when checkLogin control a request that need an authentification and isn't a ajax call or login (or related) url
@nmalin
nmalin requested a review from gilPts July 21, 2026 15:00
@jacopoc

jacopoc commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Hi @nmalin
The issue you have identified may be a side effect of one of the fixes to security vulnerabilities I pushed this year.
However, this pull request (re?)introduces a security vulnerability (see the CodeQL report), so it cannot be pushed in its current form. Please have a look when you have time.

@nmalin

nmalin commented Jul 22, 2026

Copy link
Copy Markdown
Contributor Author

Hello @jacopoc, Yes, I agree.

I try to find the good way on this spaghetti mix. I exposed my advancement on it and like you spot it, it's not enough.

I would like to secure the PREVIOUS_REQUEST attribute at the beginning for that, but as it's a sensible area, I clearly wait for your (or some other) approval.

I needed to move forward on other things, but sure, I'll look into it to solve that.

nmalin added 2 commits July 22, 2026 18:42
- tried to sanitize before send pathInfo on log or user.
- don't store previous request if the request is linked to an event
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.

2 participants