Open hellobe2121 opened 8 years ago
inst=kuleuven network requests:
Interesting part of the response to request 3:
<form action="https://netlogin.kuleuven.be/cgi-bin/wayf2.pl" method="get" name="wayf">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="layouttable">
<tr>
<td valign="top"><div align="right">Instelling / Institution:</div></td>
<td>
<select name="inst" id="inst" size="2">
<option value="kuleuven" selected="selected">Associatie KU Leuven</option>
<option value="kotnetext">KotNet Extern</option>
</select>
</td>
</tr>
<tr>
<td valign="top"><div align="right">Taal / Language:</div></td>
<td>
<input type="radio" name="lang" value="nl" checked="checked">Nederlands</input>
<input type="radio" name="lang" value="en">English</input>
</td>
</tr>
<tr>
<td colspan=2 align=center>
<input name="submit" type="submit" value="Ga verder / Continue" />
</td>
</tr>
</table>
</form>
@eliasvandeun Can you check if something looks different for you?
(I guess <option value="kuleuven" selected="selected">
will be replaced by <option value="kuleuven-campusnet" selected="selected">
)
If this is the case, we can detect which redirect we need. It will always require a detour through http://netlogin.kuleuven.be though, we won't be able to skip from 2 to 4 like we do now
These are the network requests when surfing to http://netlogin.kuleuven.be
Answer to the second request (campusnet):
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="nl" lang="nl">
<head>
<title>Netwerk Login</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="Description" content="KU Leuven, " />
<meta name="Keywords" content="KU Leuven, Katholieke Universiteit Leuven, " />
<style type="text/css" media="screen, projection">
@import url(https://stijl.kuleuven.be/_c/subnav.css);
@import url(https://stijl.kuleuven.be/_c/nieuws.css);
/* embedded styles hier */
</style>
<link rel="stylesheet" type="text/css" href="https://stijl.kuleuven.be/_c/main.css" title="default" media="screen, projection" />
<!--[if lt IE 8]><link rel="stylesheet" type="text/css" href="https://stijl.kuleuven.be/_c/IE.css" media="screen, projection" /><![endif]-->
<link rel="stylesheet" type="text/css" href="https://stijl.kuleuven.be/_c/handheld.css" media="handheld" />
<link rel="stylesheet" type="text/css" href="https://stijl.kuleuven.be/_c/print.css" media="print" />
<link rel="stylesheet" type="text/css" href="/css/style.css" title="default" />
</head>
<body>
<div id="wrapper">
<div id="header">
<h2 class="access">Taakbalk</h2>
<ul id="access">
<li><a href="#mainnav" tabindex="1" accesskey="N">navigatie</a></li>
<li><a href="#subnav" tabindex="2" accesskey="S">subnavigatie</a></li>
<li><a href="#content" tabindex="3" accesskey="C">inhoud</a></li>
</ul>
<ul id="taskbar">
<li class="home"><a href="http://www.kuleuven.be/kuleuven/" tabindex="4" id="top" name="top">home</a></li>
<li class="whoiswho"><a href="http://cwisdb.kuleuven.be/persdb-bin/persdb?lang=N&oproep=vraag">wie is wie</a></li>
<li class="organigram"><a href="http://organigram.kuleuven.be/">organigram</a></li>
<li class="contact"><a href="http://www.kuleuven.be/kuleuven/contact.html">contact</a></li>
<li class="intranet"><a href="http://www.kuleuven.be/intranet/">intranet</a></li>
<li class="langselect"><a href="http://www.kuleuven.be/english/" title="Choose English">english</a></li>
</ul>
<a href="http://www.kuleuven.be/kuleuven/"><img id="logo" src="https://stijl.kuleuven.be/logo_kuleuven.png" width="160" height="53" alt="logo" title="KU Leuven - Home" /></a>
<form action="http://robot.kuleuven.be/index.cgi" method="post" id="searchform" title="zoekformulier" name="searchform"><label for="words">zoekterm: </label>
<input tabindex="5" type="text" name="words" id="words" title="geef een zoekterm"/><input tabindex="6" type="image" class="magnifier" src="https://stijl.kuleuven.be/_i/icons/icon_magnifier.gif" alt="verstuur" title="zoek nu"/><input type="hidden" name="oproep" value="zoek" />
</form>
</div><!-- end header -->
<div id="subnav">
<h2><a href="http://admin.kuleuven.be/icts">ICTS</a></h2>
<ul id="subnavlist">
<li><a href="http://admin.kuleuven.be/icts/services">Dienstverlening voor de universiteit</a></li><li class="separator"> <br /> </li><li><a href="http://admin.kuleuven.be/icts/helpdesk">Helpdesk</a></li> </ul>
</div>
<div id="nieuws">
<div class="indekijker">
<h3>Meer informatie</h3>
<ul>
<li><a href="https://admin.kuleuven.be/icts/services/kotnet" target="_blank">KotNet algemeen</a></li>
<li><a href="https://admin.kuleuven.be/icts/services/kotnet/gebruiksvoorwaarden" target="_blank">Gedragscode voor KotNet</a></li>
<li><a href="http://status.kuleuven.be/kuleuvennet" target="_blank">Netwerk status</a></li>
<li><a href="http://icts.kuleuven.be/help/" target="_blank">Helpdesk</a></li>
</ul>
</div>
<div class="thema">
<h3>More information</h3>
<ul>
<li><a href="http://ludit.kuleuven.be/internet/index_en.html" target="_blank">KotNet in general</a></li>
<li><a href="http://ludit.kuleuven.be/internet/kotnet/voorwaarden_en.html" target="_blank">KotNet Use Policy</a></li>
<li><a href="http://status.kuleuven.be/kuleuvennet" target="_blank">Network status</a></li>
<li><a href="http://icts.kuleuven.be/help/index_en.html" target="_blank">Helpdesk</a></li>
</ul>
</div>
</div>
<div id="contentwrapper">
<div id="content">
<!-- content starts here -->
<!--<div id="navbar"><span style="display: none">Navigatiebalk: </span><a href="/">Home</a> > <a href="/leeg/">Leeg</a></div> -->
<h1>KotNet/CampusNet</h1>
<h2>Netwerk Login</h2>
<div class="associatie_logo">
<img src="/images/associatie_logo.gif" width="44" height="62" border="0"/>
</div>
Via deze login krijg je automatisch toegang tot het Internet en KotNet/CampusNet.
<br/>
<br/>
<div align="center">
<form action="/cgi-bin/netlogin.pl" method="post" name="netlogin">
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="layouttable">
<tr>
<td colspan="2">
<input type="hidden" name="inst" value="kuleuven-campusnet" />
<input type="hidden" name="lang" value="nl" />
<div align="center">
<img src="/images/kuleuven-campusnet.gif" border="0" alt="KU Leuven CampusNet" />
</div>
</td>
</tr>
<tr>
<td><div align="right">Intranet userid:</div></td>
<td><input type="text" size="20" maxlength="50" name="uid" id="uid" class="formField" /></td>
</tr>
<tr>
<td><div align="right">Wachtwoord:</div></td>
<td><input type="password" size="20" maxlength="50" name="pwd29710" class="formField" autocomplete="off"/></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="submit" value="Login" /></td>
</tr>
</table>
</form>
</div>
<script type="text/javascript">
<!--
document.getElementById("uid").focus();
if (self != top) {
top.location.href = self.location.href;
}
//-->
</script>
<!-- content ends here -->
</div>
</div>
<!--end contentwrapper-->
<div id="footer">
<p>Copyright © KU Leuven | reacties op de inhoud: <a href="mailto:ICTS@kuleuven.be">ICTS</a><br />
Realisatie: <a href="mailto:icts@kuleuven.be">ICTS</a>| <a href="http://www.kuleuven.be/kuleuven/disclaimer.html">Disclaimer</a>
</p>
</div>
</div>
</body>
</html>
When surfing to https://netlogin.kuleuven.be, you're automatically redirected to https://netlogin.kuleuven.be/cgi-bin/wayf2.pl?inst=kuleuven-campusnet&lang=nl&submit=Ga+verder+%2F+Continue
In (some) KU Leuven residences, in the Kotnet-login URL, inst=kuleuven, is replaced by inst=kuleuven-campusnet. Automatic kotnet-login therefore didn't work anymore in version 2.0.4 (login continues but results in "error 211: ongeldige organisatie"). This was fixed in version 2.0.5. However, this broke automatic kotnet-login for locations where inst=kuleuven still is in place. Version 2.0.6 reversed the situation to the 2.0.4 situation.
The following replacement for the Kotnet-redirect script is WIP. It works in instances where inst=kuleuven-campusnet, but fails to redirect and login inst=kuleuven situations.
Original code:
Replacement code
I'm not able to figure out what's wrong with the redirect for inst=kuleuven. I live in a residence where inst=kuleuven-campusnet is in place, so it is difficult to test out code.