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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

10) require_role(ROLE_CUSTOMER);
11) 
12) require_once("inc/debug.php");
13) global $debugmode;
14) 
15) if ($_GET['action'] == 'new')
16) {
17)   check_form_token('jabber_new_account');
bernd Erst filtern, dann schauen...

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

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

bernd authored 16 years ago

21)   {
22)     input_error('Sie müssen alle Felder ausfüllen!');
23)   }
24)   else
25)   {
26)     create_jabber_account($_POST['local'], $_POST['domain'], $_POST['password']);
27)     if (! $debugmode)
28)       header('Location: accounts.php');
29)   }
30) }
31) elseif ($_GET['action'] == 'chpass')
32) {
33)   check_form_token('jabber_chpass');
bernd Parse Error, hatte ich gar...

bernd authored 16 years ago

34)   get_jabberaccount_details($_POST['accountid']);
bernd Neues Jabber-Modul (noch ni...

bernd authored 16 years ago

35)   if ($_POST['newpass'] == '' ||
36)       $_POST['newpass2'] == '' ||
37)       $_POST['newpass'] != $_POST['newpass2'] ||
38)       $_POST['accountid'] == '')
39)   {
40)     input_error('Bitte zweimal ein neues Passwort eingeben!');
41)   }
42)   else
43)   {
44)     change_jabber_password($_POST['accountid'], $_POST['newpass']);
45)     if (! $debugmode)
46)       header('Location: accounts.php');
47)   }
48) }
49) elseif ($_GET['action'] == 'delete')
50) {
51)   $account = get_jabberaccount_details($_GET['account']);
bernd bisschen XSS-Schutz

bernd authored 16 years ago

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