Subversion Repositories ALCASAR

Rev

Rev 922 | Rev 930 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 922 Rev 925
Line 66... Line 66...
66
fclose($ouvre);
66
fclose($ouvre);
67
 
67
 
68
$organisme = $conf["ORGANISM"];
68
$organisme = $conf["ORGANISM"];
69
 
69
 
70
# Shared secret used to encrypt challenge with radius.
70
# Shared secret used to encrypt challenge with radius.
71
$uamsecret = "ZHoGm7No";
71
$uamsecret = "q8bxGdIg";
72
 
72
 
73
# URL loaded after success authenticates (let blank for browser defaults)
73
# URL loaded after success authenticates (let blank for browser defaults)
74
$adminurl = "";
74
$adminurl = "";
75
 
75
 
76
# Our own path
76
# Our own path
Line 117... Line 117...
117
  $l_reply_4 = "your account expired";
117
  $l_reply_4 = "your account expired";
118
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
118
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
119
  $l_reply_6 = "Your authorized connexion time has been reached";
119
  $l_reply_6 = "Your authorized connexion time has been reached";
120
  $l_online_time = "Tiempo en linea";
120
  $l_online_time = "Tiempo en linea";
121
  $l_remaining_time = "Tiempo restante";
121
  $l_remaining_time = "Tiempo restante";
122
  $l_uam_domain = "acceso directo : ";}
122
  $l_uam_domain = "Sitios web autorizados : ";}
123
else if ($Language == 'pt'){
123
else if ($Language == 'pt'){
124
  $l_ChilliError	= "A autenticação deve ser bem sucedido através do serviço de portal cativo.";
124
  $l_ChilliError	= "A autenticação deve ser bem sucedido através do serviço de portal cativo.";
125
  $l_login		= "Sucesso na autenticação.<HR>Não feche essa janela para não interromper a conexão";
125
  $l_login		= "Sucesso na autenticação.<HR>Não feche essa janela para não interromper a conexão";
126
  $l_logout		= "Fechando a conexão";
126
  $l_logout		= "Fechando a conexão";
127
  $l_loginfailed	= "Falha na autenticação";
127
  $l_loginfailed	= "Falha na autenticação";
Line 149... Line 149...
149
  $l_reply_4		= "Sua conta expirou";
149
  $l_reply_4		= "Sua conta expirou";
150
  $l_reply_5		= "Você atingiu o número máximo de logins simultâneos";
150
  $l_reply_5		= "Você atingiu o número máximo de logins simultâneos";
151
  $l_reply_6		= "Seu tempo de conexão autorizada finalizou";
151
  $l_reply_6		= "Seu tempo de conexão autorizada finalizou";
152
  $l_online_time	= "Tempo Online";
152
  $l_online_time	= "Tempo Online";
153
  $l_remaining_time	= "Tempo restante";
153
  $l_remaining_time	= "Tempo restante";
154
  $l_uam_domain		= "acesso directo : ";}
154
  $l_uam_domain		= "Sites autorizados : ";}
155
else if($Language == 'de'){
155
else if($Language == 'de'){
156
  $l_ChilliError	= "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
156
  $l_ChilliError	= "Die Authentifizierung ist erfolgreich durch die Nutzung des Portals erfolgt.";
157
  $l_login		= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die sitzung";
157
  $l_login		= "Erfolgreiche Authentifizierung.<HR>Schlißen dieses fensters unterbricht die sitzung";
158
  $l_logout		= "Beenden der Verbindung";
158
  $l_logout		= "Beenden der Verbindung";
159
  $l_loginfailed	= "Authentifizierungsfehler Eigenverbrauch";
159
  $l_loginfailed	= "Authentifizierungsfehler Eigenverbrauch";
Line 181... Line 181...
181
  $l_reply_4 = "your account expired";
181
  $l_reply_4 = "your account expired";
182
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
182
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
183
  $l_reply_6 = "Your authorized connexion time has been reached";
183
  $l_reply_6 = "Your authorized connexion time has been reached";
184
  $l_online_time = "Online-zeit";
184
  $l_online_time = "Online-zeit";
185
  $l_remaining_time = "Restzeit";
185
  $l_remaining_time = "Restzeit";
186
  $l_uam_domain = "accès direkten : ";}
186
  $l_uam_domain = "Autorisierten websites : ";}
187
else if($Language == 'nl'){
187
else if($Language == 'nl'){
188
  $l_ChilliError	= "De authenticatie moet een succes worden via de captive portal dienst.";
188
  $l_ChilliError	= "De authenticatie moet een succes worden via de captive portal dienst.";
189
  $l_login		= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
189
  $l_login		= "Succesvolle authenticatie.<HR>Dit venster te sluiten onderbreekt uw sessie.";
190
  $l_logout		= "Slotkoers verbinding";
190
  $l_logout		= "Slotkoers verbinding";
191
  $l_loginfailed	= "Authenticatie mislukt";
191
  $l_loginfailed	= "Authenticatie mislukt";
Line 213... Line 213...
213
  $l_reply_4 = "your account expired";
213
  $l_reply_4 = "your account expired";
214
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
214
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
215
  $l_reply_6 = "Your authorized connexion time has been reached";
215
  $l_reply_6 = "Your authorized connexion time has been reached";
216
  $l_online_time = "Online tijd";
216
  $l_online_time = "Online tijd";
217
  $l_remaining_time = "Reterende tijd";
217
  $l_remaining_time = "Reterende tijd";
218
  $l_uam_domain = "Direct access : ";}
218
  $l_uam_domain = "Geautoriseerde website : ";}
219
else if($Language == 'fr'){
219
else if($Language == 'fr'){
220
  $l_ChilliError	= "L'authentification doit &ecirc;tre r&eacute;ussie au travers du service du portail captif.";
220
  $l_ChilliError	= "L'authentification doit être réussie sur le portail captif.";
221
  $l_login		= "Authentification r&eacute;ussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
221
  $l_login		= "Authentification réussie.<HR>La fermeture de cette fenêtre interrompt votre session.";
222
  $l_logout		= "Fermeture de la session";
222
  $l_logout		= "Fermeture de la session";
223
  $l_loginfailed	= "Echec d'authentification";
223
  $l_loginfailed	= "Echec d'authentification";
224
  $l_loggingin		= "Identification sur le portail captif";
224
  $l_loggingin		= "Identification sur le portail captif";
225
  $l_loggedcont		= "Contr&ocirc;le d'acc&egrave;s";
225
  $l_loggedcont		= "Contrôle d'accès";
226
  $l_loggedout		= "Votre session est fermée";
226
  $l_loggedout		= "Votre session est fermée";
227
  $l_user		= "Identifiant";
227
  $l_user		= "Identifiant";
228
  $l_password		= "Mot de passe";
228
  $l_password		= "Mot de passe";
229
  $l_wait		= "Patientez un instant ...";
229
  $l_wait		= "Patientez un instant ...";
230
  $l_onlinetime		= "Temps de connexion:";
230
  $l_onlinetime		= "Temps de connexion:";
231
  $l_remainingtime	= "Deconnexion dans :";
231
  $l_remainingtime	= "Deconnexion dans :";
232
  $l_encrypted		= "La connexion avec le portail doit &ecirc;tre chiffr&eacute;e";
232
  $l_encrypted		= "La connexion avec le portail doit être chiffrée";
233
  $l_boutonO		= "Authentification";
233
  $l_boutonO		= "Authentification";
234
  $l_boutonF		= "Fermer";
234
  $l_boutonF		= "Fermer";
235
  $l_loggedin_stringl1 = "S&eacute;curit&eacute; des Syst&egrave;mes d'Information";
235
  $l_loggedin_stringl1 = "Sécurité des Systèmes d'Information";
236
  $l_loggedin_stringl2 = "Ce contr&ocirc;le a &eacute;t&eacute; mis en place pour assurer r&eacute;glementairement la tra&ccedil;abilit&eacute;, l'imputabilit&eacute; et la non-r&eacute;pudiation des connexions.";
236
  $l_loggedin_stringl2 = "Ce contrôle a été mis en place pour assurer réglementairement la traçabilité, l'imputabilité et la non-répudiation des connexions.";
237
  $l_loggedin_stringl3 = "Votre activit&eacute; sur le r&eacute;seau est enregistr&eacute;e conform&eacute;ment au respect de la vie priv&eacute;e.";
237
  $l_loggedin_stringl3 = "Votre activité sur le réseau est enregistrée conformément au respect de la vie privée.";
238
  $l_loggedin_stringl4 = "Les donn&eacute;es enregistr&eacute;es ne pourront &ecirc;tre exploit&eacute;es que par une autorit&eacute judiciaire dans le cadre d'une enqu&ecirc;te.";
238
  $l_loggedin_stringl4 = "Les données enregistrées ne pourront être exploitées que par une autorité judiciaire dans le cadre d'une enquête.";
239
  $l_loggedin_stringl5 = "Ces donn&eacute;es seront automatiquement supprim&eacute;es au bout d'un an.";
239
  $l_loggedin_stringl5 = "Ces données seront automatiquement supprimées au bout d'un an.";
240
  $l_loggedin_stringl6 = "Cliquez <a href='$alcasarpath'>ici</a> pour changer votre mot de passe ou pour intégrer le certificat de sécurité à votre navigateur";
240
  $l_loggedin_stringl6 = "Cliquez <a href='$alcasarpath'>ici</a> pour changer votre mot de passe ou pour intégrer le certificat de sécurité à votre navigateur";
241
  $l_loggedout_string = "D&eacute;connexion du portail captif effectu&eacute;e !";
241
  $l_loggedout_string = "Déconnexion du portail captif effectuée !";
242
  $l_reply_1 = "Votre dur&eacute;e de connexion journali&egrave;re a &eacute;t&eacute; atteinte";
242
  $l_reply_1 = "Votre durée de connexion journaliè a été atteinte";
243
  $l_reply_2 = "Votre dur&eacute;e de connexion mensuelle a &eacute;t&eacute; atteinte";
243
  $l_reply_2 = "Votre durée de connexion mensuelle a été atteinte";
244
  $l_reply_3 = "Vous tentez de vous connecter en dehors de votre p&eacute;riode autoris&eacute;e";
244
  $l_reply_3 = "Vous tentez de vous connecter en dehors de votre période autorisée";
245
  $l_reply_4 = "Votre compte a expir&eacute";
245
  $l_reply_4 = "Votre compte a expiré";
246
  $l_reply_5 = "Vous avez atteint le nombre maximum de connexions simultan&eacute;es";
246
  $l_reply_5 = "Vous avez atteint le nombre maximum de connexions simultanées";
247
  $l_reply_6 = "Votre dur&eacute;e de connexion autoris&eacute;e a &eacute;t&eacute; atteinte";
247
  $l_reply_6 = "Votre durée de connexion autorisée a été atteinte";
248
  $l_online_time = "Temps de connexion";
248
  $l_online_time = "Temps de connexion";
249
  $l_remaining_time = "Temps restant";
249
  $l_remaining_time = "Temps restant";
250
  $l_uam_domain = "Acc&egrave;s dirrect : ";}
250
  $l_uam_domain = "Sites autorisés : ";}
251
else{
251
else{
252
  $l_ChilliError	= "The authentication must be successful through the captive portal service.";
252
  $l_ChilliError	= "The authentication must be successful through the captive portal service.";
253
  $l_login		= "Successful authentication.<HR>Closing this window interrupts your session";
253
  $l_login		= "Successful authentication.<HR>Closing this window interrupts your session";
254
  $l_logout		= "Closing connection";
254
  $l_logout		= "Closing connection";
255
  $l_loginfailed	= "Authentication Failed";
255
  $l_loginfailed	= "Authentication Failed";
Line 277... Line 277...
277
  $l_reply_4 = "your account expired";
277
  $l_reply_4 = "your account expired";
278
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
278
  $l_reply_5 = "You have reached the maximum number of simultaneous logins";
279
  $l_reply_6 = "Your authorized connexion time has been reached";
279
  $l_reply_6 = "Your authorized connexion time has been reached";
280
  $l_online_time = "Online time";
280
  $l_online_time = "Online time";
281
  $l_remaining_time = "Remaining time";
281
  $l_remaining_time = "Remaining time";
282
  $l_uam_domain = "Direct access : ";}
282
  $l_uam_domain = "Authorized websites : ";}
283
 
283
 
284
# If https not use, tell it's wrong
284
# If https not use, tell it's wrong
285
if (!(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS'] == 'on'))) {
285
if (!(isset($_SERVER['HTTPS'])&&($_SERVER['HTTPS'] == 'on'))) {
286
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
286
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
287
<html>
287
<html>
288
<head>
288
<head>
289
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
289
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
290
  <title>$l_loggedcont</title>
290
  <title>$l_loggedcont</title>
291
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
291
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
Line 339... Line 339...
339
  $hexchal = pack ("H32", $challenge);
339
  $hexchal = pack ("H32", $challenge);
340
  $newchal = pack ("H*", md5($hexchal . $uamsecret));
340
  $newchal = pack ("H*", md5($hexchal . $uamsecret));
341
  $response = md5("\0" . $password . $newchal);
341
  $response = md5("\0" . $password . $newchal);
342
  $newpwd = pack("a32", $password);
342
  $newpwd = pack("a32", $password);
343
  $pappassword = implode ("", unpack("H32", ($newpwd ^ $newchal)));
343
  $pappassword = implode ("", unpack("H32", ($newpwd ^ $newchal)));
344
  echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
344
  echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
345
<html>
345
<html>
346
<head>
346
<head>
347
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
347
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
348
  <title>$l_loggingin</title>
348
  <title>$l_loggingin</title>
349
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
349
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
Line 370... Line 370...
370
}
370
}
371
 
371
 
372
# Otherwise it was not a form request
372
# Otherwise it was not a form request
373
# Send out an error message
373
# Send out an error message
374
if ($result == 0) {	//erreur
374
if ($result == 0) {	//erreur
375
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
375
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
376
<html>
376
<html>
377
<head>
377
<head>
378
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
378
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
379
  <title>$l_loggingin</title>
379
  <title>$l_loggingin</title>
380
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
380
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
Line 389... Line 389...
389
</body>
389
</body>
390
</html>";
390
</html>";
391
    exit(0);
391
    exit(0);
392
}
392
}
393
# Generate the output
393
# Generate the output
394
echo "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
394
echo "<!DOCTYPE html>
395
<html>
395
<html>
396
<head>
396
<head>
397
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
397
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
398
  <title>$l_loggingin</title>
398
  <title>$l_loggingin</title>
399
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
399
  <meta http-equiv=\"Cache-control\" content=\"no-cache\">
Line 455... Line 455...
455
	<form name=\"form1\" method=\"post\" action=\"$loginpath\">
455
	<form name=\"form1\" method=\"post\" action=\"$loginpath\">
456
	<input type=\"hidden\" name=\"challenge\" value=\"$challenge\">
456
	<input type=\"hidden\" name=\"challenge\" value=\"$challenge\">
457
	<input type=\"hidden\" name=\"uamip\" value=\"$uamip\">
457
	<input type=\"hidden\" name=\"uamip\" value=\"$uamip\">
458
	<input type=\"hidden\" name=\"uamport\" value=\"$uamport\">
458
	<input type=\"hidden\" name=\"uamport\" value=\"$uamport\">
459
	<input type=\"hidden\" name=\"userurl\" value=\"$userurl\">
459
	<input type=\"hidden\" name=\"userurl\" value=\"$userurl\">
460
		<table id=\"boite-logon\">
460
	<table id=\"boite-logon\">
461
			<tr>
461
		<tr>
462
				<td width=\"20%\" rowspan=\"3\"><img id=\"logo-organ\" src=\"/images/organisme.png\"></td>
462
			<td width=\"20%\" rowspan=\"3\"><img id=\"logo-organ\" src=\"/images/organisme.png\"></td>
463
				<td width=\"30%\" align=\"right\">$l_user</td>
463
			<td width=\"30%\" align=\"right\">$l_user</td>
464
				<td width=\"50%\" align=\"left\"><INPUT type=\"text\" maxLength=\"32\" name=\"UserName\" autocomplete=\"off\"></td>
464
			<td width=\"50%\" align=\"left\"><INPUT type=\"text\" maxLength=\"32\" name=\"UserName\" autocomplete=\"off\"></td>
465
			</tr>
465
		</tr>
466
			<tr>
466
		<tr>
467
				<td align=\"right\">$l_password</td>
467
			<td align=\"right\">$l_password</td>
468
				<td align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\" autocomplete=\"off\"></td>
468
			<td align=\"left\"><INPUT maxLength=\"32\" type=\"password\" name=\"Password\" autocomplete=\"off\"></td>
469
			</tr>
469
		</tr>
470
			<tr>
470
		<tr>
471
				<td height=\"23\" colSpan=\"2\" align=\"center\"><INPUT value=\"$l_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></td>
471
			<td height=\"23\" colSpan=\"2\" align=\"center\"><INPUT value=\"$l_boutonO\" type=\"submit\" name=\"button\" onclick=\"javascript:popUp('$statuspath')\"></td>
472
			</tr>
472
		</tr>
473
		</table>
473
	</table>
-
 
474
	</form>
474
		<table id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\">
475
	<table id=\"boite-info\" cellSpacing=\"0\" cellPadding=\"0\" width=\"100%\">
475
			<tr>
476
		<tr>
476
				<td align=\"center\"><FONT color=\"red\"><B>$l_loggedin_stringl1</B></FONT></td>
477
			<td align=\"center\"><FONT color=\"red\"><B>$l_loggedin_stringl1</B></FONT></td>
477
			</tr>
478
		</tr>
478
			<tr>
479
		<tr>
479
				<td align=\"left\">
480
			<td align=\"left\">
480
					<ul>
481
				<ul>
481
						<LI>$l_loggedin_stringl2</LI>
482
					<LI>$l_loggedin_stringl2</LI>
482
						<LI>$l_loggedin_stringl4</LI>
483
					<LI>$l_loggedin_stringl4</LI>
483
						<LI>$l_loggedin_stringl3</LI>
484
					<LI>$l_loggedin_stringl3</LI>
484
						<LI>$l_loggedin_stringl5</LI>
485
					<LI>$l_loggedin_stringl5</LI>
485
						<LI>$l_loggedin_stringl6</LI>
486
					<LI>$l_loggedin_stringl6</LI>
486
					</ul>
487
				</ul>
487
				</td>
488
			</td>
488
			</tr>
489
		</tr>
489
		</table>";
490
	</table>";
490
 
491
 
491
  
-
 
492
// Read the "Domain alowed" file
492
// Read the "Domain alowed" file
493
$tab=file(DOMAIN_ALLOWED_LIST);
493
$tab=file(DOMAIN_ALLOWED_LIST);
494
if ($tab)  # the file isn't empty
494
if ($tab)  # the file isn't empty
495
	{
495
	{
496
	echo "<div id=\"authorized_domain\"><li>$l_uam_domain</li>";
496
	echo "<div id=\"authorized_domain\">$l_uam_domain";
497
	foreach ($tab as $line)
497
	foreach ($tab as $line)
498
		{
498
		{
499
		if (trim($line) != '') # the line isn't empty
499
		if (trim($line) != '') # the line isn't empty
500
		{
500
			{
501
			$domain_allowed=explode("#", $line);
501
			$domain_allowed=explode("#", $line);
502
			$uamdomain=trim($domain_allowed[0],"#");
502
			if (trim($domain_allowed[1]) != ''){
503
			$domain=explode("\"", $uamdomain);
503
				$domain=explode("\"", $domain_allowed[0]);
504
			if ((isset($domain_allowed[1])) && (trim($domain_allowed[1]) != '')){
-
 
505
				echo "<li><a href=\"http://".trim($domain[1])."\">".trim($domain_allowed[1])."</a></li>";
504
				echo "<a href=\"http://".trim($domain[1])."\">".trim($domain_allowed[1])."</a> ";}
506
			}
-
 
507
			else echo"<li><a href=\"http://".trim($domain[1])."\">".trim($domain[1])."</a></li>";
-
 
508
			}
505
			}	
509
		}
506
		}
510
		echo "</div>";
-
 
511
	}
507
	}
512
 
-
 
513
echo "
508
echo "	
514
  </form>
-
 
515
  </div>
509
</div>
516
  </center>
510
</center>
517
</body>
511
</body>
518
</html>";
512
</html>";
519
}
513
}
520
exit(0);
514
exit(0);
521
?>
515
?>