struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukasz Lenart (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (WW-4774) Upgrding Struts 2.3.1 to 2.5.10.1 - Redirect issues HTTPS to HTTP
Date Sun, 26 Mar 2017 10:40:42 GMT

    [ https://issues.apache.org/jira/browse/WW-4774?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15941782#comment-15941782
] 

Lukasz Lenart edited comment on WW-4774 at 3/26/17 10:40 AM:
-------------------------------------------------------------

Thank You for looking into the issue. 

 1. Logged in the the application built on struts 2 version 2.5.10.1
 2. it takes to dashboard page (main page)
 3. click on add user Button on the main page and then it prompts up popup window to input
new user details to be created.
 4. click on submit button on the popup. The request is sent to rest api (running on other
instance) and user is persisted in DB successfully then  popup gets closed and redirect to
main dashboard page to show newly created user details . But the popup still remain showing
up and not getting closed  even though the new user is created successfully
 5. Errors on chrome and IE developers tool. (Mixed content and  CORS)
6. We dont see any issues with struts 2.3.1. 

below code snippet will help you . The remote url is https 

{code:java}
@SuppressWarnings("serial")
@Namespace("/account")
@Results({
	@Result(name = Views.DASHBOARD, location = "/account/dashboard.tiles", type = TILES),
	@Result(name = Views.DASHBOARD_REDIRECT, location = "/account/viewdashboard", type = REDIRECT),
	@Result(name = Views.UPDATE_REDIRECT, location = "/account/updateForm", type = REDIRECT),
	@Result(name = Views.CREATE, location = "/account/create.tiles", type = Views.Types.TILES),
	@Result(name = Views.UPDATE, location = "/account/edit.tiles", type = Views.Types.TILES),
	@Result(name = Views.CREATE_USER, location = "/user/createUser.tiles", type = Views.Types.TILES)
})
public class AccountXXX extends AuthXXXome {

@Action("create")
	public String create() {
		try {
			account = restAPI.getUserCreation().create(targetAccount);
			accountId = account.getId();
			addActionMessage(getText("account.create.success"));

			return Views.DASHBOARD_REDIRECT;
		} catch (final RuntimeException e) {
			processException(e);
			return Views.CREATE;
		}
	}
}	
{code}



was (Author: devulapalli):
Thank You for looking into the issue. 

 1. Logged in the the application built on struts 2 version 2.5.10.1
 2. it takes to dashboard page (main page)
 3. click on add user Button on the main page and then it prompts up popup window to input
new user details to be created.
 4. click on submit button on the popup. The request is sent to rest api (running on other
instance) and user is persisted in DB successfully then  popup gets closed and redirect to
main dashboard page to show newly created user details . But the popup still remain showing
up and not getting closed  even though the new user is created successfully
 5. Errors on chrome and IE developers tool. (Mixed content and  CORS)
6. We dont see any issues with struts 2.3.1. 

below code snippet will help you . The remote url is https 

@SuppressWarnings("serial")
@Namespace("/account")
@Results({
	@Result(name = Views.DASHBOARD, location = "/account/dashboard.tiles", type = TILES),
	@Result(name = Views.DASHBOARD_REDIRECT, location = "/account/viewdashboard", type = REDIRECT),
	@Result(name = Views.UPDATE_REDIRECT, location = "/account/updateForm", type = REDIRECT),
	@Result(name = Views.CREATE, location = "/account/create.tiles", type = Views.Types.TILES),
	@Result(name = Views.UPDATE, location = "/account/edit.tiles", type = Views.Types.TILES),
	@Result(name = Views.CREATE_USER, location = "/user/createUser.tiles", type = Views.Types.TILES)
})
public class AccountXXX extends AuthXXXome {

@Action("create")
	public String create() {
		try {
			account = restAPI.getUserCreation().create(targetAccount);
			accountId = account.getId();
			addActionMessage(getText("account.create.success"));

			return Views.DASHBOARD_REDIRECT;
		} catch (final RuntimeException e) {
			processException(e);
			return Views.CREATE;
		}
	}
}	
	




> Upgrding Struts 2.3.1 to 2.5.10.1 - Redirect issues  HTTPS to HTTP
> ------------------------------------------------------------------
>
>                 Key: WW-4774
>                 URL: https://issues.apache.org/jira/browse/WW-4774
>             Project: Struts 2
>          Issue Type: Bug
>            Reporter: upendar
>            Priority: Critical
>
> We are upgrading Struts2 from 2.3.1 to 2.5.10.1 ; redirect  making https:// to http://
. The following errors in chrome and IE are seen while redirecting  from the popup to main
window
> redirecting  popup (create user) --- main window (viewdashboard)  - the URL shows https://
to http://
> We are blocked completely due to this issue and need support ASAP. We also reviewed the
apache server configurations and looks good. Please share the fix in detail.
> Error Issue in chrome :
> Mixed Content: The page at 'https://XXXXX/XX/XX/viewdashboard?clear&Id=1&uar=44'
was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://XXX/XX/XX/viewdashboard?uar=44&Id=1'.
This request has been blocked; the content must be served over HTTPS.
> Issue in IE
> SEC7127: Redirect was blocked for CORS request.
> File: account
> SCRIPT7002: XMLHttpRequest: Network Error 0x2ef1, Could not complete the operation due
to error 00002ef1.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message