Security

 View Only
last person joined: yesterday 

Forum to discuss Enterprise security using HPE Aruba Networking NAC solutions (ClearPass), Introspect, VIA, 360 Security Exchange, Extensions, and Policy Enforcement Firewall (PEF).
Expand all | Collapse all

CPG Login receipt automatic jump to another page

This thread has been viewed 9 times
  • 1.  CPG Login receipt automatic jump to another page

    Posted May 05, 2021 06:35 AM
    The official way to skip over the receipt page and presnet the login page is described here: https://community.arubanetworks.com/browse/articles/blogviewer?blogkey=758fff81-4ecb-435d-bfc6-70567c73df66

    On my ClearPass running 6.9.5 I'm creating a conference enrolment (login) with subsequent attendee registration. I want to jump from the conference enrolment (called the Login Message) to the attendee registration page. The above technote implies I should be possible using the javascript:

    <script type="text/javascript"><!--
    addLoadEvent(function() {ldelim}
    window.location.href='guest_registration.php';
    {rdelim});
    //-->
    </script>

    But this does not work.
    If I remove the addLoadEvent(function() and );  ie:

    <script type="text/javascript"><!--
    {ldelim}
    window.location.href='guest_registration.php';
    {rdelim}
    //-->
    </script>


    Then it works.
    Why is this?
    This was tested on FFv88.0

    I can also remove the HTML comments (<!-- and -->) though not sure why these are in here?

    I can also remove  Smarty delimiter tag ({ldelim} and {rdelim}), I believe these are used to escape any characters { and } but as I don't have any they seem redundant?

    Ultimately I can get this down to:

    <script type="text/javascript">
    window.location.href='guest_registration.php';
    </script>

    Thoughts?

    ------------------------------
    Derin Mellor
    ------------------------------


  • 2.  RE: CPG Login receipt automatic jump to another page

    EMPLOYEE
    Posted May 11, 2021 10:28 AM
    I'm not a JavaScript expert, but think the difference it that the original code sets the new URL once the page has been loaded (AddLoadEvent triggers the code in the function once the page is fully loaded); and I think your abbreviated version may load/execute while the code is read. Which in this case may not be an issue, but may not be considered good coding. The { } are part of that AddLoadEvent construct, so if you remove that, it doesn't surprise me that you don't need it.

    If there are JavaScript experts, please chime in.

    On the <!-- comment -->, that is done for browsers that don't support JavaScript. Those (old, possibly text based) will print out text in tags that are not understood.

    Please test with many different devices if this does what you want it to do, and there is many crappy JavaScript code out there that works but may not be conform best coding practices.

    ------------------------------
    Herman Robers
    ------------------------
    If you have urgent issues, always contact your Aruba partner, distributor, or Aruba TAC Support. Check https://www.arubanetworks.com/support-services/contact-support/ for how to contact Aruba TAC. Any opinions expressed here are solely my own and not necessarily that of Hewlett Packard Enterprise or Aruba Networks.
    ------------------------------



  • 3.  RE: CPG Login receipt automatic jump to another page

    Posted May 11, 2021 10:51 AM
    Herman,

    But the original code does not work at all. I have to remove addLoadEvent(function()  for it to work.

    Derin

    ------------------------------
    Derin Mellor
    ------------------------------