You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Authentication fails in the Shopware app-bundle when the shop_url property contains a trailing slash, causing token retrieval to fail due to malformed URL construction.
Description
When using the Shopware app-bundle in a Symfony server backend application, if the shop_url property ends with a forward slash (/), the authentication process fails. This occurs because the URL for obtaining the OAuth token becomes malformed, resulting in a double slash in the path.
Current Behavior
When shop_url ends with a slash (e.g., "www.test.de/")
The resulting OAuth token URL becomes: "www.test.de//api/oauth/token"
Authentication fails due to the malformed URL with double slashes
Expected Behavior
OAuth token URL should always be correctly formed with a single slash
Authentication should succeed regardless of whether shop_url has a trailing slash
Expected URL format: "www.test.de/api/oauth/token"
Steps to Reproduce
Configure Shopware app-bundle in a Symfony server backend application
Set shop_url property with a trailing slash (e.g., "www.test.de/")
Attempt to authenticate
Observe authentication failure
Impact
Critical severity as it prevents successful authentication
Affects all implementations where shop_url might contain a trailing slash
May cause production issues if not caught during development
Suggested Fix
Implement URL normalization for the shop_url property:
Either strip trailing slashes from shop_url before use
Or implement proper URL path joining that handles slashes correctly
Environment
Component: Shopware app-bundle
Framework: Symfony
Context: Server backend application
Additional Notes
This issue requires immediate attention as it affects core authentication functionality. Consider adding validation or automatic normalization of the shop_url property to prevent this issue.
The text was updated successfully, but these errors were encountered:
Summary
Authentication fails in the Shopware app-bundle when the shop_url property contains a trailing slash, causing token retrieval to fail due to malformed URL construction.
Description
When using the Shopware app-bundle in a Symfony server backend application, if the shop_url property ends with a forward slash (/), the authentication process fails. This occurs because the URL for obtaining the OAuth token becomes malformed, resulting in a double slash in the path.
Current Behavior
When shop_url ends with a slash (e.g., "www.test.de/")
The resulting OAuth token URL becomes: "www.test.de//api/oauth/token"
Authentication fails due to the malformed URL with double slashes
Expected Behavior
OAuth token URL should always be correctly formed with a single slash
Authentication should succeed regardless of whether shop_url has a trailing slash
Expected URL format: "www.test.de/api/oauth/token"
Steps to Reproduce
Configure Shopware app-bundle in a Symfony server backend application
Set shop_url property with a trailing slash (e.g., "www.test.de/")
Attempt to authenticate
Observe authentication failure
Impact
Critical severity as it prevents successful authentication
Affects all implementations where shop_url might contain a trailing slash
May cause production issues if not caught during development
Suggested Fix
Implement URL normalization for the shop_url property:
Either strip trailing slashes from shop_url before use
Or implement proper URL path joining that handles slashes correctly
Environment
Component: Shopware app-bundle
Framework: Symfony
Context: Server backend application
Additional Notes
This issue requires immediate attention as it affects core authentication functionality. Consider adding validation or automatic normalization of the shop_url property to prevent this issue.
The text was updated successfully, but these errors were encountered: