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

Do not store console popups in session #3842

Merged
merged 1 commit into from
May 3, 2018
Merged

Do not store console popups in session #3842

merged 1 commit into from
May 3, 2018

Conversation

evertmulder
Copy link
Contributor

@evertmulder evertmulder commented Apr 25, 2018

The console popup windows update the user session data (session[:tab_url][sid]). This data is used falsely by the dashboard_controller.rb in redirect_to_remembered, method that tries to redirect the console in the main ManageIQ UI. This leads to a exception in the manageiq ui. See #3833.

This PR is a really ugly fix that mitigates the issue for VMWARE WebMKS and HTML5 console. I think this PR must be improved to fix it for all possible popup windows... Suggestions are welcome.

Links

@@ -1872,6 +1872,10 @@ def remember_tab

url = URI.parse(request.url).path

if (url.include? "launch_vmware_console") || (url.include? "launch_html5_console")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about?

return if %w(launch_vmware_console launch_html5_console).any? { |i| url.include?(i) }

This would also solve the rubocop issues...

Copy link
Member

@skateman skateman Apr 26, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also a comment about why do we need this line would be nice.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I will apply your suggestions

@miq-bot
Copy link
Member

miq-bot commented Apr 28, 2018

Checked commit evertmulder@c97a3ff with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
1 file checked, 0 offenses detected
Everything looks fine. ⭐

Copy link
Member

@skateman skateman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Seal of Approval

@skateman
Copy link
Member

skateman commented May 3, 2018

@miq-bot assign @martinpovolny

@martinpovolny martinpovolny merged commit aa147f5 into ManageIQ:master May 3, 2018
@martinpovolny martinpovolny added this to the Sprint 85 Ending May 7, 2018 milestone May 3, 2018
@martinpovolny
Copy link
Member

gaprindashvili?

@skateman
Copy link
Member

skateman commented May 3, 2018

I think we need a BZ for that.

@skateman
Copy link
Member

skateman commented May 3, 2018

@miq-bot add_label gaprindashvili/yes, fine/yes
@simaishi here is the BZ https://bugzilla.redhat.com/show_bug.cgi?id=1574488

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants