3ef995c2108fe77d22c0b556fb9717cb848bc48f
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 8 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 year ago

2) 
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 8 years ago

3) /*
4) This file belongs to the Webinterface of schokokeks.org Hosting
5) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

6) Written by schokokeks.org Hosting, namely
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 8 years ago

7)   Bernd Wurst <bernd@schokokeks.org>
8)   Hanno Böck <hanno@schokokeks.org>
9) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 3 years ago

10) This code is published under a 0BSD license.
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 8 years ago

11) 
12) Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code.
13) */
14) 
15) require_once('inc/security.php');
16) require_once('inc/icons.php');
17) 
18) require_once('domains.php');
19) require_role(ROLE_CUSTOMER);
20) 
21) title("Externe Domain hinzufügen");
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 2 years ago

22) $section = 'domains_domains';
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 8 years ago

23) 
24) if (!isset($_REQUEST['domain'])) {
25)     system_failure('Kein Domainname übergeben');
26) }
Bernd Wurst hardening domain input (II)

Bernd Wurst authored 8 years ago

27) $request = idn_to_utf8($_REQUEST['domain'], 0, INTL_IDNA_VARIANT_UTS46);
28) if (substr($request, 0, 4) == 'www.') {
29)     $request = str_replace('www.', '', $request);
30) }
Bernd Wurst Umstellung von filter_input...

Bernd Wurst authored 6 years ago

31) verify_input_hostname_utf8($request);
Bernd Wurst hardening domain input (II)

Bernd Wurst authored 8 years ago

32) $punycode = idn_to_ascii($request, 0, INTL_IDNA_VARIANT_UTS46);
33) if (!check_domain($punycode)) {
Hanno Böck Spaces between string conca...

Hanno Böck authored 2 years ago

34)     warning("Ungültiger Domainname: " . filter_output_html($request));
Bernd Wurst hardening domain input (II)

Bernd Wurst authored 8 years ago

35)     redirect('');
36) }
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 8 years ago

37) 
Bernd Wurst hardening domain input (II)

Bernd Wurst authored 8 years ago

38) $id = insert_domain_external($request, ($_REQUEST['dns'] === 'enable'), ($_REQUEST['email'] === 'enable'));
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 8 years ago

39)