e8f68aaa48e6a9935e01ac1e3b0d1cdb9182b315
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

1) <?php
2) 
3) require_once('session/start.php');
4) 
5) require_once('domains.php');
6) require_once('jabberaccounts.php');
7) 
bernd bisschen XSS-Schutz

bernd authored 16 years ago

8) require_once('inc/security.php');
9) 
10) 
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

11) require_role(ROLE_CUSTOMER);
12) 
13) require_once("inc/debug.php");
14) global $debugmode;
15) DEBUG("GET: ".htmlentities(print_r($_GET, true))." / POST: ".htmlentities(print_r($_POST, true)));
16) 
17) if ($_GET['action'] == 'new')
18) {
19)   check_form_token('jabber_new_account');
bernd Erst filtern, dann schauen...

bernd authored 16 years ago

20)   if (filter_input_username($_POST['local']) == '' ||
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

21)       $_POST['domain'] == '' ||
bernd Erst filtern, dann schauen...

bernd authored 16 years ago

22)       filter_shell($_POST['password']) == '')
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

23)   {
24)     input_error('Sie müssen alle Felder ausfüllen!');
25)   }
26)   else
27)   {
28)     create_jabber_account($_POST['local'], $_POST['domain'], $_POST['password']);
29)     if (! $debugmode)
30)       header('Location: accounts.php');
31)   }
32) }
33) elseif ($_GET['action'] == 'chpass')
34) {
35)   check_form_token('jabber_chpass');
36)   if ($_POST['newpass'] == '' ||
37)       $_POST['newpass2'] == '' ||
38)       $_POST['newpass'] != $_POST['newpass2'] ||
39)       $_POST['accountid'] == '')
40)   {
41)     input_error('Bitte zweimal ein neues Passwort eingeben!');
42)   }
43)   else
44)   {
45)     change_jabber_password($_POST['accountid'], $_POST['newpass']);
46)     if (! $debugmode)
47)       header('Location: accounts.php');
48)   }
49) }
50) elseif ($_GET['action'] == 'delete')
51) {
52)   $account = get_jabberaccount_details($_GET['account']);
bernd bisschen XSS-Schutz

bernd authored 16 years ago

53)   $account_string = filter_input_general( $account['local'].'@'.$account['domain'] );