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

Incorrect logic for generating the MyAccount URL #22378

Open
pamodaaw opened this issue Jan 23, 2025 · 0 comments
Open

Incorrect logic for generating the MyAccount URL #22378

pamodaaw opened this issue Jan 23, 2025 · 0 comments
Labels
Affected/7.1.0-m6 Issues that get reported against IS7.1.0 M6 pack will get this label Severity/Minor Type/Bug

Comments

@pamodaaw
Copy link
Contributor

Description

There is a util method to generate the MyAccount URL for the given organization[1]. This method gets the applications for the given organization by filtering with the MyAccount name and from the retrieved MyAccount application details accessUrl is retrieved.
If the MyAccount is not shared with the sub-orgs, the application object will be null and the URL will be built using the ServiceURLBuilder. Since the public URL of the application is considered within the ServiceURLBuilder, the generated URL is not tenant qualified.

This results in a wrong URL being generated as the URL of the MyAccount for the suborg.
Sample for a generated URL
https://localhost:9443/o/11612c9f-8597-4ea2-9f94-cea233b31b90/myaccount

Sample for the correct access URL for MyAccount
https://localhost:9443/t/wso2.com/o/11612c9f-8597-4ea2-9f94-cea233b31b90/myaccount

[1] https://github.com/wso2/carbon-identity-framework/blob/master/components/identity-mgt/org.wso2.carbon.identity.mgt.endpoint.util/src/main/java/org/wso2/carbon/identity/mgt/endpoint/util/IdentityManagementEndpointUtil.java#L185

Steps to Reproduce

Create a suborg and trigger a password recovery for the suborg's login page.

In a password recovery flow, the user can return to the application once the password is reset successfully.

Image

If the callbackUrl in the request is null by any chance, the user should be returned to the MyAccount. [1]

Image

Redirected URL - https://localhost:9443/o/11612c9f-8597-4ea2-9f94-cea233b31b90/myaccount
Displayed Error

Image

[1] https://github.com/wso2/identity-apps/blob/247fbd8aa9ed6877bbef51f15127a7c7cb8fdc13/identity-apps-core/apps/recovery-portal/src/main/webapp/recovery.jsp#L119

Version

wso2is-7.1.0-m7

Environment Details (with versions)

No response

@pamodaaw pamodaaw added Affected/7.1.0-m6 Issues that get reported against IS7.1.0 M6 pack will get this label Severity/Minor Type/Bug labels Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affected/7.1.0-m6 Issues that get reported against IS7.1.0 M6 pack will get this label Severity/Minor Type/Bug
Projects
Status: No status
Development

No branches or pull requests

1 participant