Browse Source

[security] Unsafe inline fixes - Saml text issue and cross button fix. (#3974)

This is fixes two minor issues

the ui starts showing up "You're being redirected to a SSO login page." looks little odd, so hiding everything and keeping as earlier.
There is a cross button showing up in ui. and moving across the page
---------

Co-authored-by: Mohammed Tabraiz <tabraiz@cloudera.com>
Tabraiz 10 months ago
parent
commit
28c5987f0a

+ 4 - 5
desktop/core/src/desktop/templates/djangosaml2/post_binding_form.html

@@ -3,11 +3,10 @@
 		document.SSO_Login.submit();
 	};
 </script>
-<p>
-You're being redirected to a SSO login page.
-Please click the button below if you're not redirected automatically within a few seconds.
-</p>
-<form method="post" action="{{ target_url }}" name="SSO_Login">
+<style type="text/css"{% if request.csp_nonce %} nonce="{{ request.csp_nonce }}"{% endif %}>
+   form#SSO_Login { display: none; } /* Hide the form */
+</style>
+<form method="post" action="{{ target_url }}" name="SSO_Login" id="SSO_Login">
 	{% for key, value in params.items %}
 	    <input type="hidden" name="{{ key }}" value="{{ value }}" />
 	{% endfor %}

+ 4 - 2
desktop/libs/notebook/src/notebook/templates/editor_components.mako

@@ -285,13 +285,15 @@ else:
 
 
 <!-- ko if: $root.isResultFullScreenMode() -->
-<a class="hueAnchor collapse-results" href="javascript:void(0)" title="${ _('Collapse results') }" data-bind="click: function(){ $root.isResultFullScreenMode(false); }">
+<a class="hueAnchor collapse-results hidden" href="javascript:void(0)" title="${ _('Collapse results') }"
+   data-bind="click: function(){ $root.isResultFullScreenMode(false); }, css: { hidden: !$root.isResultFullScreenMode() }">
   <i class="fa fa-times fa-fw"></i>
 </a>
 <!-- /ko -->
 
 <!-- ko if: $root.isPresentationMode() -->
-<a class="hueAnchor collapse-results" href="javascript:void(0)" title="${ _('Exit presentation') }" data-bind="click: function(){ $root.selectedNotebook().isPresentationMode(false); }">
+<a class="hueAnchor collapse-results hidden" href="javascript:void(0)" title="${ _('Exit presentation') }"
+   data-bind="click: function(){ $root.selectedNotebook().isPresentationMode(false); }, css: { hidden: !$root.isPresentationMode() }">
   <i class="fa fa-times fa-fw"></i>
 </a>
 <!-- /ko -->