-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Low
-
Affects Version/s: 4.8.14, 4.8.15
-
Component/s: Integrations
-
Minor
Issue Summary
Jira to Fisheye integration via Development panel redirects to login screen, followed by Fisheye home page, instead of a commit or a branch page.
Steps to Reproduce
- Click the commit or branch in the Development panel of Jira.
- In the popup window in Jira, click the specific commit or branch.
- It takes to the login page of Fisheye, with what appears to be the right URL.
- Once credentials are entered and login button or enter is clicked, the URL changes to a redirect one and takes to the Fisheye homepage instead of the commit or branch which was clicked.
Expected Results
Jira to Fisheye integration link should redirect to commit or branch page after logging in.
Actual Results
Jira to Fisheye integration link redirects to home page.
Workaround
Use the following Byteman script to patch the LoginServlet#doLogin method:
# This is a workaround for FECRU-9341 bug. RULE login_servlet_do_login_session_not_null CLASS com.cenqua.fisheye.web.LoginServlet METHOD doLogin AT ENTRY BIND isLogged:boolean = com.cenqua.fisheye.web.LoginServlet.login($1, $2); session:javax.servlet.http.HttpSession = $1.getSession(); originalUrl:java.lang.String = $this.getOriginalUrl($1); IF isLogged AND session != NULL DO $this.sessionIdManager.invalidateAll(session.getId()); $this.eventPublisher.publish(new com.atlassian.fecru.analytics.AnalyticsEvent("fecru.user.logged.in")); com.cenqua.fisheye.web.ServletUtils.sendRedirectFrom($2, originalUrl, "login"); org.slf4j.LoggerFactory.getLogger("Byteman").info("<- LoginServlet#doLoginSessionNotNull entry"); return; ENDRULE RULE login_servlet_do_login_session_is_null CLASS com.cenqua.fisheye.web.LoginServlet METHOD doLogin AT ENTRY BIND isLogged:boolean = com.cenqua.fisheye.web.LoginServlet.login($1, $2); session:javax.servlet.http.HttpSession = $1.getSession(); originalUrl:java.lang.String = $this.getOriginalUrl($1); IF isLogged AND session == NULL DO $this.eventPublisher.publish(new com.atlassian.fecru.analytics.AnalyticsEvent("fecru.user.logged.in")); com.cenqua.fisheye.web.ServletUtils.sendRedirectFrom($2, originalUrl, "login"); org.slf4j.LoggerFactory.getLogger("Byteman").info("<- LoginServlet#doLoginSessionIsNull entry"); return; ENDRULE RULE login_servlet_do_login_logged_false CLASS com.cenqua.fisheye.web.LoginServlet METHOD doLogin AT ENTRY BIND isLogged:boolean = com.cenqua.fisheye.web.LoginServlet.login($1, $2); IF NOT isLogged DO $1.getRequestDispatcher("/WEB-INF/jsp/login.jsp").forward($1, $2); org.slf4j.LoggerFactory.getLogger("Byteman").info("<- LoginServlet#doLoginNotLogged entry"); return; ENDRULE