Maybe a little feature for IdP to allow hashtags in target URL
Martin Lunze
martin.lunze at tu-dresden.de
Fri Feb 20 02:06:04 EST 2015
Hello together,
my Name is Martin Lunze.
I am the administrator of the Shibboleth IdPs of the Technische
Universität Dresden.
Last week we connected a new SP to our IdPs, whose resources are browsed
via hashtags (html anchors) in the url.
As a result of hashtags were not send to the server and only live in the
browser of the client, the user didn't lands on the correct position of
the desired page he accessed at the beginning.
After the first redirection of the SP to the login-page of the IdP the
hashtags will stay.
But after submitting the login-form they disappear.
Now one of my colleagues wrote a little shell-script to modify the
necessary html templates in the opensaml.jar.
The script adds the hashtags to the action-url in every onload-function
where the formulares will be send to.
Additionally you have to add the following peace of code to the
login.jsp of the shibboleth and the attribute-releases.jsp of the uApprove.
<script type="text/javascript">
window.onload = function() {
var forms = document.getElementsByTagName("form");
for(var i=0; i < forms.length; i++) {
forms[i].action += window.location.hash;
}
};
</script>
Attention!!!
Don't forget to remove the action-attribut of the html form in the
attribute-release.jsp!!!
If you don't remove it all internet explorer users will fail to login
via shibboleth because internet explorer makes dirty things with empty
strings in the action attribut when you edit it via javascript.
An missing action-attribut in a html-form has the same effect like an
empty-string.
So it should work like before.
I will attach the shell-script.
Maybe its interesting enough to add the code in the next release of the idp?
Please let me know if you see some problems.
At the moment we use it without problems.
With nice regards.
--
Martin Lunze
Technische Universität Dresden
Zentrum für Informationsdienste und Hochleistungsrechnen
Trefftz-Bau, HRSK 151
Zellescher Weg 12-14
01062 Dresden
+49 351 463-35881
martin.lunze at tu-dresden.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-shibboleth-anchors.sh
Type: application/x-shellscript
Size: 868 bytes
Desc: not available
Url : http://shibboleth.net/pipermail/dev/attachments/20150220/e83693fc/attachment.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5096 bytes
Desc: S/MIME Cryptographic Signature
Url : http://shibboleth.net/pipermail/dev/attachments/20150220/e83693fc/attachment-0001.bin
More information about the dev
mailing list