Viewing File: /usr/local/cpanel/base/frontend/jupiter/integration/index.html.tt

[%#
# cpanel - base/frontend/jupiter/integration/index.html.tt
#                                                  Copyright 2022 cPanel, L.L.C.
#                                                           All rights reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited
-%]
[% CPANEL.CPVAR.dprefix = '../' %]
[%-
    SET safe_app = RAW_FORM('app').remove('[^0-9A-Za-z_-]');
-%]
[% WRAPPER '_assets/master.html.tt'
    app_key = safe_app;
-%]

[%

SET redirect_info = execute(
    'Integration',
    'fetch_url'
    { 'app'=> safe_app  }
);

redirect_url = redirect_info.data.redirect_url || redirect_info.data.url;

IF redirect_url;
    SET safe_context = RAW_FORM('context').uri;

    IF safe_context;
        IF !redirect_url.match('[&?]context=.+');
            redirect_url = redirect_url _ (redirect_url.match('\?') ? '&' : '?');
            redirect_url = redirect_url _ 'context=' _ safe_context;
        END;
    END;

    html_safe_redirect_url = redirect_url.html;

  '<div class="success_details">';
  locale.maketext("The system will redirect you in a moment.");
  '<meta http-equiv="refresh" content="0;url=' _ html_safe_redirect_url  _ '" />';
  '</div>';
ELSIF redirect_info.errors;
  '<div class="error_details">';
  html_safe_error = redirect_info.errors_as_string FILTER html;
  locale.maketext("The system encountered an error while it attempted to fetch the auto login [asis,url]: [_1]", html_safe_error);
  '</div>';
ELSE;
  '<div class="error_details">';
  locale.maketext("The system encountered an unknown error while it attempted to fetch the auto login [asis,URL].");
  '</div>';
END;

-%]

[% END %]
Back to Directory File Manager