Project

General

Profile

Download (17.6 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
	system_authservers.php
4

    
5
	Copyright (C) 2008 Shrew Soft Inc.
6
	Copyright (C) 2010 Ermal Luçi
7
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
8
	All rights reserved.
9

    
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12

    
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15

    
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19

    
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31
/*
32
	pfSense_MODULE:	auth
33
*/
34

    
35
##|+PRIV
36
##|*IDENT=page-system-authservers
37
##|*NAME=System: Authentication Servers
38
##|*DESCR=Allow access to the 'System: Authentication Servers' page.
39
##|*MATCH=system_authservers.php*
40
##|-PRIV
41

    
42
require("guiconfig.inc");
43
require_once("auth.inc");
44

    
45
$pgtitle = array(gettext("System"), gettext("Authentication Servers"));
46
$shortcut_section = "authentication";
47

    
48
if (is_numericint($_GET['id']))
49
	$id = $_GET['id'];
50
if (isset($_POST['id']) && is_numericint($_POST['id']))
51
	$id = $_POST['id'];
52

    
53
if (!is_array($config['system']['authserver']))
54
	$config['system']['authserver'] = array();
55

    
56
$a_servers = auth_get_authserver_list();
57
foreach ($a_servers as $servers)
58
	$a_server[] = $servers;
59

    
60
if (!is_array($config['ca']))
61
	$config['ca'] = array();
62
$a_ca =& $config['ca'];
63

    
64
$act = $_GET['act'];
65
if ($_POST['act'])
66
	$act = $_POST['act'];
67

    
68
if ($act == "del") {
69

    
70
	if (!$a_server[$_GET['id']]) {
71
		pfSenseHeader("system_authservers.php");
72
		exit;
73
	}
74

    
75
	/* Remove server from main list. */
76
	$serverdeleted = $a_server[$_GET['id']]['name'];
77
	foreach ($config['system']['authserver'] as $k => $as) {
78
		if ($config['system']['authserver'][$k]['name'] == $serverdeleted)
79
			unset($config['system']['authserver'][$k]);
80
	}
81

    
82
	/* Remove server from temp list used later on this page. */
83
	unset($a_server[$_GET['id']]);
84

    
85
	$savemsg = gettext("Authentication Server")." {$serverdeleted} ".
86
				gettext("deleted")."<br />";
87
	write_config($savemsg);
88
}
89

    
90
if ($act == "edit") {
91
	if (isset($id) && $a_server[$id]) {
92

    
93
		$pconfig['type'] = $a_server[$id]['type'];
94
		$pconfig['name'] = $a_server[$id]['name'];
95

    
96
		if ($pconfig['type'] == "ldap") {
97
			$pconfig['ldap_caref'] = $a_server[$id]['ldap_caref'];
98
			$pconfig['ldap_host'] = $a_server[$id]['host'];
99
			$pconfig['ldap_port'] = $a_server[$id]['ldap_port'];
100
			$pconfig['ldap_urltype'] = $a_server[$id]['ldap_urltype'];
101
			$pconfig['ldap_protver'] = $a_server[$id]['ldap_protver'];
102
			$pconfig['ldap_scope'] = $a_server[$id]['ldap_scope'];
103
			$pconfig['ldap_basedn'] = $a_server[$id]['ldap_basedn'];
104
			$pconfig['ldap_authcn'] = $a_server[$id]['ldap_authcn'];
105
			$pconfig['ldap_extended_enabled'] = $a_server[$id]['ldap_extended_enabled'];
106
			$pconfig['ldap_extended_query'] = $a_server[$id]['ldap_extended_query'];
107
			$pconfig['ldap_binddn'] = $a_server[$id]['ldap_binddn'];
108
			$pconfig['ldap_bindpw'] = $a_server[$id]['ldap_bindpw'];
109
			$pconfig['ldap_attr_user'] = $a_server[$id]['ldap_attr_user'];
110
			$pconfig['ldap_attr_group'] = $a_server[$id]['ldap_attr_group'];
111
			$pconfig['ldap_attr_member'] = $a_server[$id]['ldap_attr_member'];
112
			$pconfig['ldap_utf8'] = isset($a_server[$id]['ldap_utf8']);
113
			$pconfig['ldap_nostrip_at'] = isset($a_server[$id]['ldap_nostrip_at']);
114

    
115
			if (!$pconfig['ldap_binddn'] || !$pconfig['ldap_bindpw'])
116
				$pconfig['ldap_anon'] = true;
117
		}
118

    
119
		if ($pconfig['type'] == "radius") {
120
			$pconfig['radius_host'] = $a_server[$id]['host'];
121
			$pconfig['radius_auth_port'] = $a_server[$id]['radius_auth_port'];
122
			$pconfig['radius_acct_port'] = $a_server[$id]['radius_acct_port'];
123
			$pconfig['radius_secret'] = $a_server[$id]['radius_secret'];
124
			$pconfig['radius_timeout'] = $a_server[$id]['radius_timeout'];
125

    
126
			if ($pconfig['radius_auth_port'] &&
127
				$pconfig['radius_acct_port'] ) {
128
				$pconfig['radius_srvcs'] = "both";
129
			}
130

    
131
			if ( $pconfig['radius_auth_port'] &&
132
				!$pconfig['radius_acct_port'] ) {
133
				$pconfig['radius_srvcs'] = "auth";
134
				$pconfig['radius_acct_port'] = 1813;
135
			}
136

    
137
			if (!$pconfig['radius_auth_port'] &&
138
				 $pconfig['radius_acct_port'] ) {
139
				$pconfig['radius_srvcs'] = "acct";
140
				$pconfig['radius_auth_port'] = 1812;
141
			}
142

    
143
		}
144
	}
145
}
146

    
147
if ($act == "new") {
148
	$pconfig['ldap_protver'] = 3;
149
	$pconfig['ldap_anon'] = true;
150
	$pconfig['radius_srvcs'] = "both";
151
	$pconfig['radius_auth_port'] = "1812";
152
	$pconfig['radius_acct_port'] = "1813";
153
}
154

    
155
if ($_POST) {
156
	unset($input_errors);
157
	$pconfig = $_POST;
158

    
159
	/* input validation */
160

    
161
	if ($pconfig['type'] == "ldap") {
162
		$reqdfields = explode(" ", "name type ldap_host ldap_port ".
163
						"ldap_urltype ldap_protver ldap_scope ".
164
						"ldap_attr_user ldap_attr_group ldap_attr_member ldapauthcontainers");
165
		$reqdfieldsn = array(
166
			gettext("Descriptive name"),
167
			gettext("Type"),
168
			gettext("Hostname or IP"),
169
			gettext("Port value"),
170
			gettext("Transport"),
171
			gettext("Protocol version"),
172
			gettext("Search level"),
173
			gettext("User naming Attribute"),
174
			gettext("Group naming Attribute"),
175
			gettext("Group member attribute"),
176
			gettext("Authentication container"));
177

    
178
		if (!$pconfig['ldap_anon']) {
179
			$reqdfields[] = "ldap_binddn";
180
			$reqdfields[] = "ldap_bindpw";
181
			$reqdfieldsn[] = gettext("Bind user DN");
182
			$reqdfieldsn[] = gettext("Bind Password");
183
		}
184
	}
185

    
186
	if ($pconfig['type'] == "radius") {
187
		$reqdfields = explode(" ", "name type radius_host radius_srvcs");
188
		$reqdfieldsn = array(
189
			gettext("Descriptive name"),
190
			gettext("Type"),
191
			gettext("Hostname or IP"),
192
			gettext("Services"));
193

    
194
		if ($pconfig['radisu_srvcs'] == "both" ||
195
			$pconfig['radisu_srvcs'] == "auth") {
196
			$reqdfields[] = "radius_auth_port";
197
			$reqdfieldsn[] = gettext("Authentication port value");
198
		}
199

    
200
		if ($pconfig['radisu_srvcs'] == "both" ||
201
			$pconfig['radisu_srvcs'] == "acct") {
202
			$reqdfields[] = "radius_acct_port";
203
			$reqdfieldsn[] = gettext("Accounting port value");
204
		}
205

    
206
		if (!isset($id)) {
207
			$reqdfields[] = "radius_secret";
208
			$reqdfieldsn[] = gettext("Shared Secret");
209
		}
210
	}
211

    
212
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
213

    
214
	if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['host']))
215
		$input_errors[] = gettext("The host name contains invalid characters.");
216

    
217
	if (auth_get_authserver($pconfig['name']) && !isset($id))
218
		$input_errors[] = gettext("An authentication server with the same name already exists.");
219

    
220
	if (($pconfig['type'] == "radius") && isset($_POST['radius_timeout']) && !empty($_POST['radius_timeout']) && (!is_numeric($_POST['radius_timeout']) || (is_numeric($_POST['radius_timeout']) && ($_POST['radius_timeout'] <= 0))))
221
		$input_errors[] = gettext("RADIUS Timeout value must be numeric and positive.");
222

    
223
	/* if this is an AJAX caller then handle via JSON */
224
	if (isAjax() && is_array($input_errors)) {
225
		input_errors2Ajax($input_errors);
226
		exit;
227
	}
228

    
229
	if (!$input_errors) {
230
		$server = array();
231
		$server['refid'] = uniqid();
232
		if (isset($id) && $a_server[$id])
233
			$server = $a_server[$id];
234

    
235
		$server['type'] = $pconfig['type'];
236
		$server['name'] = $pconfig['name'];
237

    
238
		if ($server['type'] == "ldap") {
239

    
240
			if (!empty($pconfig['ldap_caref']))
241
				$server['ldap_caref'] = $pconfig['ldap_caref'];
242
			$server['host'] = $pconfig['ldap_host'];
243
			$server['ldap_port'] = $pconfig['ldap_port'];
244
			$server['ldap_urltype'] = $pconfig['ldap_urltype'];
245
			$server['ldap_protver'] = $pconfig['ldap_protver'];
246
			$server['ldap_scope'] = $pconfig['ldap_scope'];
247
			$server['ldap_basedn'] = $pconfig['ldap_basedn'];
248
			$server['ldap_authcn'] = $pconfig['ldapauthcontainers'];
249
			$server['ldap_extended_enabled'] = $pconfig['ldap_extended_enabled'];
250
			$server['ldap_extended_query'] = $pconfig['ldap_extended_query'];
251
			$server['ldap_attr_user'] = $pconfig['ldap_attr_user'];
252
			$server['ldap_attr_group'] = $pconfig['ldap_attr_group'];
253
			$server['ldap_attr_member'] = $pconfig['ldap_attr_member'];
254
			if ($pconfig['ldap_utf8'] == "yes")
255
				$server['ldap_utf8'] = true;
256
			else
257
				unset($server['ldap_utf8']);
258
			if ($pconfig['ldap_nostrip_at'] == "yes")
259
				$server['ldap_nostrip_at'] = true;
260
			else
261
				unset($server['ldap_nostrip_at']);
262

    
263

    
264
			if (!$pconfig['ldap_anon']) {
265
				$server['ldap_binddn'] = $pconfig['ldap_binddn'];
266
				$server['ldap_bindpw'] = $pconfig['ldap_bindpw'];
267
			} else {
268
				unset($server['ldap_binddn']);
269
				unset($server['ldap_bindpw']);
270
			}
271
		}
272

    
273
		if ($server['type'] == "radius") {
274

    
275
			$server['host'] = $pconfig['radius_host'];
276

    
277
			if ($pconfig['radius_secret'])
278
				$server['radius_secret'] = $pconfig['radius_secret'];
279

    
280
			if ($pconfig['radius_timeout'])
281
				$server['radius_timeout'] = $pconfig['radius_timeout'];
282
			else
283
				$server['radius_timeout'] = 5;
284

    
285
			if ($pconfig['radius_srvcs'] == "both") {
286
				$server['radius_auth_port'] = $pconfig['radius_auth_port'];
287
				$server['radius_acct_port'] = $pconfig['radius_acct_port'];
288
			}
289

    
290
			if ($pconfig['radius_srvcs'] == "auth") {
291
				$server['radius_auth_port'] = $pconfig['radius_auth_port'];
292
				unset($server['radius_acct_port']);
293
			}
294

    
295
			if ($pconfig['radius_srvcs'] == "acct") {
296
				$server['radius_acct_port'] = $pconfig['radius_acct_port'];
297
				unset($server['radius_auth_port']);
298
			}
299
		}
300

    
301
		if (isset($id) && $config['system']['authserver'][$id])
302
			$config['system']['authserver'][$id] = $server;
303
		else
304
			$config['system']['authserver'][] = $server;
305

    
306
		write_config();
307

    
308
		pfSenseHeader("system_authservers.php");
309
	}
310
}
311

    
312
include("head.inc");
313

    
314
if ($input_errors)
315
	print_input_errors($input_errors);
316
if ($savemsg)
317
	print_info_box($savemsg);
318

    
319
$tab_array = array();
320
$tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
321
$tab_array[] = array(gettext("Groups"), false, "system_groupmanager.php");
322
$tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.php");
323
$tab_array[] = array(gettext("Servers"), true, "system_authservers.php");
324
display_top_tabs($tab_array);
325

    
326
if (!($act == "new" || $act == "edit" || $input_errors))
327
{
328
	?>
329
	<table class="table">
330
		<thead>
331
			<tr>
332
				<th><?=gettext("Server Name")?></th>
333
				<th><?=gettext("Type")?></th>
334
				<th><?=gettext("Host Name")?></th>
335
				<th></th>
336
			</tr>
337
		</thead>
338
		<tbody>
339
	<?php foreach($a_server as $i => $server): ?>
340
			<tr>
341
				<td><?=htmlspecialchars($server['name'])?></td>
342
				<td><?=htmlspecialchars($auth_server_types[$server['type']])?></td>
343
				<td><?=htmlspecialchars($server['host'])?></td>
344
				<td>
345
				<?php if ($i < (count($a_server) - 1)): ?>
346
					<a href="system_authservers.php?act=edit&amp;id=<?=$i?>" class="btn btn-xs btn-primary">edit</a>
347
					<a href="system_authservers.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger" onclick="return confirm('<?=gettext("Do you really want to delete this Server?")?>')">delete</a>
348
				<?php endif?>
349
				</td>
350
			</tr>
351
	<?php endforeach; ?>
352
		</tbody>
353
	</table>
354

    
355
	<a href="?act=new" class="btn btn-success">add new</a>
356
<?php
357
	include("foot.inc");
358
	exit;
359
}
360

    
361
require('classes/Form.class.php');
362
$form = new Form;
363
$form->setAction('system_authservers.php?act=edit');
364
$form->addGlobal(new Form_Input(
365
	'userid',
366
	null,
367
	'hidden',
368
	$id
369
));
370

    
371
$section = new Form_Section('Server settings');
372

    
373
$section->addInput($input = new Form_Input(
374
	'name',
375
	'Descriptive name',
376
	'text',
377
	$pconfig['name']
378
));
379

    
380
if ($act == 'edit')
381
	$input->setReadonly();
382

    
383
$section->addInput($input = new Form_Select(
384
	'type',
385
	'Type',
386
	$pconfig['type'],
387
	$auth_server_types
388
))->toggles('.toggle-type');
389

    
390
if ($act == 'edit')
391
	$input->setDisabled();
392

    
393
$form->add($section);
394
$section = new Form_Section('LDAP Server Settings');
395
$section->addClass('toggle-type collapse');
396

    
397
if (!isset($pconfig['type']) || $pconfig['type'] == 'ldap')
398
	$section->addClass('in');
399

    
400
$section->addInput(new Form_Input(
401
	'ldap_host',
402
	'Hostname or IP address',
403
	'text',
404
	$pconfig['ldap_host']
405
))->setHelp('NOTE: When using SSL, this hostname MUST match the Common Name '.
406
	'(CN) of the LDAP server"s SSL Certificate.');
407

    
408
$section->addInput(new Form_Input(
409
	'ldap_port',
410
	'Port value',
411
	'number',
412
	$pconfig['ldap_port']
413
));
414

    
415
$section->addInput(new Form_Select(
416
	'ldap_urltype',
417
	'Transport',
418
	$pconfig['ldap_urltype'],
419
	array_combine(array_keys($ldap_urltypes), array_keys($ldap_urltypes))
420
));
421

    
422
if (empty($a_ca))
423
{
424
	$section->addInput(new Form_StaticText(
425
		'Peer Certificate Authority',
426
		'No Certificate Authorities defined.<br/>Create one under <a href="system_camanager.php">System &gt; Cert Manager</a>.'
427
	));
428
}
429
else
430
{
431
	$ldapCaRef = [];
432
	foreach ($a_ca as $ca)
433
		$ldapCaRef[ $ca['refid'] ] = $ca['descr'];
434

    
435
	$section->addInput(new Form_Select(
436
		'ldap_caref',
437
		'Peer Certificate Authority',
438
		$pconfig['ldap_caref'],
439
		$ldapCaRef
440
	))->setHelp('This option is used if \'SSL Encrypted\' option is choosen. '.
441
		'It must match with the CA in the AD otherwise problems will arise.');
442
}
443

    
444
$section->addInput(new Form_Select(
445
	'ldap_protver',
446
	'Protocol version',
447
	$pconfig['ldap_protver'],
448
	array_combine($ldap_protvers, $ldap_protvers)
449
));
450

    
451
$group = new Form_Group('Search scope');
452
$group->add(new Form_Select(
453
	'ldap_scope',
454
	'Level',
455
	$pconfig['ldap_scope'],
456
	$ldap_scopes
457
));
458
$group->add(new Form_Input(
459
	'ldap_basedn',
460
	'Base DN',
461
	'text',
462
	$pconfig['ldap_basedn']
463
));
464
$section->add($group);
465

    
466
$group = new Form_Group('Authentication containers');
467
$group->add(new Form_Input(
468
	'ldapauthcontainers',
469
	'Containers',
470
	'text',
471
	$pconfig['ldap_authcn']
472
))->setHelp('Note: Semi-Colon separated. This will be prepended to the search '.
473
	'base dn above or you can specify full container path containing a dc= '.
474
	'component.<br/>Example: CN=Users;DC=example,DC=com or OU=Staff;OU=Freelancers');
475
#FIXME
476
$group->add(new Form_Button(
477
	'Select',
478
	'Select a container',
479
	'/system_usermanager_settings_ldapacpicker.php?port=389&host=192.168.1.1&scope=one&basedn=CN=pfsense&binddn=&bindpw=&urltype=TCP%20-%20Standard&proto=3&authcn=OU=Staff&cert='
480
));
481
$section->add($group);
482

    
483
$group = new Form_Group('Extended Query');
484
$group->add(new Form_Checkbox(
485
	'ldap_extended_enabled',
486
	'Enable Extended Query',
487
	null,
488
	$pconfig['ldap_extended_enabled']
489
))->toggles('.toggle-extended');
490

    
491
$group->add(new Form_Input(
492
	'ldap_extended_query',
493
	'Extended Query',
494
	'text',
495
	$pconfig['ldap_extended_query']
496
))->setHelp('Example: &amp;(objectClass=inetOrgPerson)(mail=*@example.com)')->addClass('toggle-extended collapse');
497
$section->add($group);
498

    
499
$section->addInput(new Form_Checkbox(
500
	'ldap_anon',
501
	'Bind anonymous',
502
	'Use anonymous binds to resolve distinguished names',
503
	$pconfig['ldap_anon']
504
))->toggles('.toggle-anon');
505

    
506
$group = new Form_Group('Bind credentials');
507
$group->addClass('toggle-anon collapse');
508
$group->add(new Form_Input(
509
	'ldap_binddn',
510
	'User DN:',
511
	'text',
512
	$pconfig['ldap_binddn']
513
));
514
$group->add(new Form_Input(
515
	'ldap_bindpw',
516
	'Password',
517
	'text',
518
	$pconfig['ldap_bindpw']
519
));
520
$section->add($group);
521

    
522
if ($act == 'add')
523
{
524
	$ldap_templates = array_map($ldap_templates, function($t){ return $t['desc']; });
525

    
526
	$section->addInput(new Form_Select(
527
		'ldap_tmpltype',
528
		'Initial Template',
529
		$pconfig['ldap_template'],
530
		$ldap_templates
531
	));
532
}
533

    
534
$section->addInput(new Form_Input(
535
	'ldap_attr_user',
536
	'User naming attribute',
537
	'text',
538
	$pconfig['ldap_attr_user']
539
));
540

    
541
$section->addInput(new Form_Input(
542
	'ldap_attr_group',
543
	'Group naming attribute',
544
	'text',
545
	$pconfig['ldap_attr_group']
546
));
547

    
548
$section->addInput(new Form_Input(
549
	'ldap_attr_member',
550
	'Group member attribute',
551
	'text',
552
	$pconfig['ldap_attr_member']
553
));
554

    
555
$section->addInput(new Form_Checkbox(
556
	'ldap_utf8',
557
	'UTF8 Encode',
558
	'UTF8 encode LDAP parameters before sending them to the server.',
559
	$pconfig['ldap_utf8']
560
))->setHelp('Required to support international characters, but may not be '.
561
	'supported by every LDAP server.');
562

    
563
$section->addInput(new Form_Checkbox(
564
	'ldap_nostrip_at',
565
	'Username Alterations',
566
	'Do not strip away parts of the username after the @ symbol',
567
	$pconfig['ldap_nostrip_at']
568
))->setHelp('e.g. user@host becomes user when unchecked.');
569

    
570
$form->add($section);
571
$section = new Form_Section('Radius Server Settings');
572
$section->addClass('toggle-type collapse');
573

    
574
$section->addInput(new Form_Input(
575
	'radius_host',
576
	'Hostname or IP address',
577
	'text',
578
	$pconfig['radius_host']
579
));
580

    
581
$section->addInput(new Form_Input(
582
	'radius_secret',
583
	'Shared Secret',
584
	'text',
585
	$pconfig['radius_secret']
586
));
587

    
588
$section->addInput(new Form_Select(
589
	'radius_srvcs',
590
	'Services offered',
591
	$pconfig['radius_srvcs'],
592
	$radius_srvcs
593
));
594

    
595
$section->addInput(new Form_Input(
596
	'radius_auth_port',
597
	'Authentication port value',
598
	'number',
599
	$pconfig['radius_secret']
600
));
601

    
602
$section->addInput(new Form_Input(
603
	'radius_acct_port',
604
	'Authentication Timeout',
605
	'number',
606
	$pconfig['radius_acct_port']
607
));
608

    
609
$section->addInput(new Form_Input(
610
	'radius_timeout',
611
	'Authentication Timeout',
612
	'number',
613
	$pconfig['radius_timeout']
614
))->setHelp('This value controls how long, in seconds, that the RADIUS '.
615
	'server may take to respond to an authentication request. If left blank, the '.
616
	'default value is 5 seconds. NOTE: If you are using an interactive two-factor '.
617
	'authentication system, increase this timeout to account for how long it will '.
618
	'take the user to receive and enter a token.');
619

    
620
if (isset($id) && $a_server[$id])
621
{
622
	$section->addInput(new Form_Input(
623
		'id',
624
		null,
625
		'hidden',
626
		$id
627
	));
628
}
629

    
630
$form->add($section);
631
print $form;
632

    
633
include("foot.inc");
(208-208/252)