354c05a4ddd678c49bcbba458bffa7d13482139a
Bernd Wurst Ermögliche das Hinzufügen e...

Bernd Wurst authored 6 years ago

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

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 6 years ago

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

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 6 years ago

10) 
11) 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.
12) */
13) 
14) require_once('inc/security.php');
15) require_once('inc/icons.php');
16) 
17) require_once('domains.php');
18) require_role(ROLE_CUSTOMER);
19) 
20) title("Externe Domain hinzufügen");
Hanno Böck codingstyle, spaces between...

Hanno Böck authored 1 year ago

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

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 5 years ago

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

Bernd Wurst authored 6 years ago

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

Hanno Böck authored 1 year ago

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

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 6 years ago

36) 
Bernd Wurst hardening domain input (II)

Bernd Wurst authored 6 years ago

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

Bernd Wurst authored 6 years ago

38)