<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi Marvin,</p>
    <p>we have a local service provider which heavily uses hashtags (#)
      in the URLs and some of our "gold"-members asked for a
      user-friendly solution.</p>
    <p>So, we decided to "fix" this behaviour on the side of IdP.<br>
    </p>
    <p>The main-problem is that the part of the URL after the # is used
      as an achor in HTML.<br>
      It is normally NOT send to the webserver!<br>
      The webserver delivers the webpage to the browser and your browser
      parses the page for such a spring-mark and scrolls down to this.</p>
    <p>If you are not logged in in the SP, your browser receives a
      redirect.<br>
      At this moment your browser adds the part of the URL after the #
      to the path received by the redirect.<br>
      This seems to be the only situation in the shibboleth-flow where
      the part after the # will retained unchanged.<br>
    </p>
    <p>But at the moment you submit the login-form or the
      user-consent-form the part after the # gets lost.<br>
      So you have to modify some sites (.vm) of the IdP to ensure the
      part after the # will be retained during the complete
      login-process.</p>
    <p>
      <blockquote type="cite">-
        /opt/shibboleth-idp/views/intercept/attribute-release.vm<br>
            - add javascript to modify "form action - url" [1]<br>
        <br>
        - /opt/shibboleth-idp/views/login.vm<br>
            - add javascript to modify "form action - url" [1]<br>
        <br>
        -
        /opt/shibboleth-idp/webapp/WEB-INF/lib/opensaml-saml-impl-3.3.0.jar<br>
            - templates/saml1-post-binding.vm<br>
                - add javascript to modify "form action - url" [2]<br>
        <br>
            - templates/saml2-post-artifact-binding.vm<br>
                - add javascript to modify "form action - url" [2]<br>
        <br>
            - templates/saml2-post-binding.vm<br>
                - add javascript to modify "form action - url" [2]<br>
        <br>
            - templates/saml2-post-simplesign-binding.vm<br>
                - add javascript to modify "form action - url" [2]<br>
        <br>
        [1]<br>
        <script type="text/javascript"><br>
        window.onload = function() {<br>
            var forms = document.getElementsByTagName("form");<br>
            for(var i=0; i < forms.length; i++) {<br>
                forms[i].action += window.location.hash;<br>
            }<br>
        };<br>
        </script><br>
        <br>
        [2]<br>
        document.forms[0].action+=window.location.hash;<br>
      </blockquote>
    </p>
    <p>Maybe the little shell script in the attachement helps you to
      modify all necessary files automatically.<br>
    </p>
    <p>After a rebuild of your IdP the original requested URL should
      stay intact with the complete path including the part after the #.<br>
      We use this modification in production since version 2.4 of IdP
      and never had a problem, but be aware of that i assume no
      responsibility.<br>
    </p>
    With nice regards<br>
    Martin<br>
    <br>
    <div class="moz-cite-prefix">On 21.11.2017 14:04, Marvin Addison
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CACOs9MSWQ4XxfGHwS8Y47bO_RGw6ya40du_zTaSLgTt8M5Th1A@mail.gmail.com">
      <pre wrap="">On Thu, Nov 16, 2017 at 4:04 AM Tobias Galéus <a class="moz-txt-link-rfc2396E" href="mailto:tobias.galeus@gu.se"><tobias.galeus@gu.se></a> wrote:

</pre>
      <blockquote type="cite">
        <pre wrap="">Yes, I'm aware of the problems with using hashtags in URLs, but how what
is the solution to make this work?
</pre>
      </blockquote>
      <pre wrap="">

I can't think of any reason this shouldn't work, so I'm thinking it's a
bug. Can you please file an issue and assign to me?

Thanks,
Marvin <a class="moz-txt-link-rfc2396E" href="mailto:users-unsubscribe@shibboleth.net"><users-unsubscribe@shibboleth.net></a>

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Martin Lunze
IT-Systemadministrator

Technische Universität Dresden
Zentrum für Informationsdienste und Hochleistungsrechnen (ZIH)
Operative Prozesse und Systeme (OPS)
01062 Dresden

Tel.: +49 (351) 463-35881
E-Mail: <a class="moz-txt-link-abbreviated" href="mailto:martin.lunze@tu-dresden.de">martin.lunze@tu-dresden.de</a></pre>
  </body>
</html>